Function at 0x413380
Capabilities:
Create directory
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x53cb58
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push ebx
push esi
push edi
mov eax, dword [0x58fa50]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x1d8], ebx
je 0x4133d3
xor eax, eax
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x1d8], 1
cmp dword [esi + 0xbc], ebx
je 0x4133bb
mov eax, dword [esi + 0x4a0]
mov ecx, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
mov edi, dword [eax + 0x14]
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edi
mov dword [esp + 0x2c], ebx
call fcn.00403c80
add esp, 4
push 0x5680fe
lea ecx, [esp + 0x1c]
mov dword [esp + 0x8c], ebx
call fcn.00403bc0
push 0x5680fe
lea ecx, [esp + 0x28]
mov byte [esp + 0x8c], 1
call fcn.00403bc0
mov byte [esp + 0x88], 2
mov ecx, dword [esp + 0x24]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esi + 0x4a0]
cmp dword [eax + 0xc], 1
jne 0x413979
cmp edi, ebx
jle 0x413b78
mov al, byte [esi + 0xf2]
mov ebx, dword [esp + 0x20]
mov edi, dword [esi + 0xbc]
mov dl, byte [esi + 0xf3]
sar ebx, 4
mov dword [esp + 0x1c], 0
mov byte [esp + 0x5c], al
mov eax, dword [edi + 4]
and ebx, 0xff
mov byte [esp + 0x60], dl
test eax, eax
jne 0x4134c1
mov ecx, dword [edi + 8]
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x5c]
push ecx
push edx
push ebx
push 0x3e01
push eax
call dword [sym.imp.dtccm2.dll_WriteSensorReg]
add esp, 0x14
jmp 0x4134d8
cmp eax, 1
jne 0x4134d8
mov ecx, dword [esp + 0x5c]
push eax
push 2
push 0x3e01
push ecx
call fcn.004032f0
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dl, byte [esi + 0xf3]
mov al, byte [esi + 0xf2]
mov byte [esp + 0x78], dl
mov edx, dword [esi + 0xbc]
mov byte [esp + 0x48], al
mov eax, dword [edx + 4]
test eax, eax
jne 0x413524
mov ecx, dword [edx + 8]
mov edx, dword [esp + 0x78]
push ecx
mov ecx, dword [esp + 0x4c]
push edx
lea eax, [esp + 0x24]
push eax
push 0x3e01
push ecx
call dword [sym.imp.dtccm2.dll_ReadSensorReg]
add esp, 0x14
jmp 0x413543
cmp eax, 1
jne 0x413543
mov ecx, dword [esp + 0x48]
push eax
lea eax, [esp + 0x20]
push eax
push ecx
mov eax, 2
mov ecx, 0x3e01
call fcn.00403420
mov dword [esp + 0x14], 0
cmp word [esp + 0x1c], bx
je 0x41362a
mov al, byte [esi + 0xf2]
mov edi, dword [esi + 0xbc]
mov dl, byte [esi + 0xf3]
mov byte [esp + 0x40], al
mov eax, dword [edi + 4]
mov byte [esp + 0x74], dl
test eax, eax
jne 0x413596
mov ecx, dword [edi + 8]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x40]
push ecx
push edx
push ebx
push 0x3e01
push eax
call dword [sym.imp.dtccm2.dll_WriteSensorReg]
add esp, 0x14
jmp 0x4135ad
cmp eax, 1
jne 0x4135ad
mov ecx, dword [esp + 0x40]
push eax
push 2
push 0x3e01
push ecx
call fcn.004032f0
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dl, byte [esi + 0xf3]
mov al, byte [esi + 0xf2]
mov byte [esp + 0x6c], dl
mov edx, dword [esi + 0xbc]
mov byte [esp + 0x58], al
mov eax, dword [edx + 4]
test eax, eax
jne 0x4135f9
mov ecx, dword [edx + 8]
mov edx, dword [esp + 0x6c]
push ecx
mov ecx, dword [esp + 0x5c]
push edx
lea eax, [esp + 0x24]
push eax
push 0x3e01
push ecx
call dword [sym.imp.dtccm2.dll_ReadSensorReg]
add esp, 0x14
jmp 0x413618
cmp eax, 1
jne 0x413618
mov ecx, dword [esp + 0x58]
push eax
lea eax, [esp + 0x20]
push eax
push ecx
mov eax, 2
mov ecx, 0x3e01
call fcn.00403420
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, 0x32
jl 0x41354b
mov al, byte [esi + 0xf3]
mov edx, dword [esp + 0x20]
mov edi, dword [esi + 0xbc]
mov cl, byte [esi + 0xf2]
and edx, 0xf
mov byte [esp + 0x64], al
mov eax, dword [edi + 4]
shl edx, 4
movzx ebx, dx
mov byte [esp + 0x50], cl
test eax, eax
jne 0x413677
mov edx, dword [edi + 8]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x50]
push edx
push eax
push ebx
push 0x3e02
push ecx
call dword [sym.imp.dtccm2.dll_WriteSensorReg]
add esp, 0x14
jmp 0x41368e
cmp eax, 1
jne 0x41368e
mov edx, dword [esp + 0x50]
push eax
push 2
push 0x3e02
push edx
call fcn.004032f0
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, byte [esi + 0xf3]
mov edx, dword [esi + 0xbc]
mov cl, byte [esi + 0xf2]
mov byte [esp + 0x68], al
mov eax, dword [edx + 4]
mov byte [esp + 0x44], cl
test eax, eax
jne 0x4136da
mov edx, dword [edx + 8]
mov eax, dword [esp + 0x68]
push edx
mov edx, dword [esp + 0x48]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0x3e02
push edx
call dword [sym.imp.dtccm2.dll_ReadSensorReg]
add esp, 0x14
jmp 0x4136f9
cmp eax, 1
jne 0x4136f9
mov ecx, dword [esp + 0x44]
push eax
lea eax, [esp + 0x20]
push eax
push ecx
mov eax, 2
mov ecx, 0x3e02
call fcn.00403420
mov dword [esp + 0x14], 0
cmp word [esp + 0x1c], bx
je 0x4137e0
mov al, byte [esi + 0xf2]
mov edi, dword [esi + 0xbc]
mov dl, byte [esi + 0xf3]
mov byte [esp + 0x4c], al
mov eax, dword [edi + 4]
mov byte [esp + 0x70], dl
test eax, eax
jne 0x41374c
mov ecx, dword [edi + 8]
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x4c]
push ecx
push edx
push ebx
push 0x3e02
push eax
call dword [sym.imp.dtccm2.dll_WriteSensorReg]
add esp, 0x14
jmp 0x413763
cmp eax, 1
jne 0x413763
mov ecx, dword [esp + 0x4c]
push eax
push 2
push 0x3e02
push ecx
call fcn.004032f0
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dl, byte [esi + 0xf3]
mov al, byte [esi + 0xf2]
mov byte [esp + 0x3c], dl
mov edx, dword [esi + 0xbc]
mov byte [esp + 0x54], al
mov eax, dword [edx + 4]
test eax, eax
jne 0x4137af
mov ecx, dword [edx + 8]
mov edx, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x58]
push edx
lea eax, [esp + 0x24]
push eax
push 0x3e02
push ecx
call dword [sym.imp.dtccm2.dll_ReadSensorReg]
add esp, 0x14
jmp 0x4137ce
cmp eax, 1
jne 0x4137ce
mov ecx, dword [esp + 0x54]
push eax
lea eax, [esp + 0x20]
push eax
push ecx
mov eax, 2
mov ecx, 0x3e02
call fcn.00403420
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, 0x32
jl 0x413701
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
push edi
push edx
lea eax, [esp + 0x2c]
push str._s_d
push eax
call fcn.00401650
mov ecx, dword [esp + 0x34]
add esp, 0x10
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
add edi, dword [esp + 0x38]
push 0xc8
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0040bf30
call fcn.0040bf30
call fcn.0040bf30
xor ebx, ebx
mov dword [esp + 0x14], ebx
cmp dword [esp + 0x2c], ebx
jle 0x413961
call fcn.0040bf30
mov edx, dword [esp + 0x24]
push ebx
push edx
lea eax, [esp + 0x20]
push str._s_d.bmp
push eax
call fcn.00401650
mov al, byte [esi + 0xf0]
add esp, 0x10
test al, al
je 0x41386a
cmp al, 6
jne 0x4138f3
movzx edx, word [esi + 0xec]
movzx eax, word [esi + 0xee]
imul eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
xor ecx, ecx
xor edi, edi
xor ebx, ebx
test eax, eax
jle 0x4138ef
mov edi, edi
mov eax, dword [esi + 0x198]
movzx edx, byte [eax + edi]
mov byte [eax + ecx], dl
mov eax, dword [esi + 0x198]
movzx edx, byte [eax + edi + 1]
mov byte [eax + ecx + 1], dl
mov eax, dword [esi + 0x198]
movzx edx, byte [eax + edi + 2]
mov byte [eax + ecx + 2], dl
mov eax, dword [esi + 0x198]
movzx edx, byte [eax + edi + 3]
mov byte [eax + ecx + 3], dl
movzx edx, word [esi + 0xec]
movzx eax, word [esi + 0xee]
imul eax, edx
cdq
and edx, 3
add eax, edx
inc ebx
sar eax, 2
add ecx, 4
add edi, 5
cmp ebx, eax
jl 0x413890
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx - 8]
mov eax, 1
sub eax, dword [ecx - 4]
or edx, eax
jge 0x413915
push 0
lea ecx, [esp + 0x1c]
call fcn.004014e0
mov ecx, dword [esp + 0x18]
mov eax, dword [esi + 0x198]
movzx edx, word [esi + 0xee]
movzx edi, word [esi + 0xec]
test eax, eax
je 0x41393a
push edx
push edi
push eax
mov edx, 8
call fcn.00406e40
mov eax, dword [esp + 0x28]
inc ebx
push ebx
push eax
lea ecx, [esp + 0x20]
push str.Step_d_Img_d
push ecx
mov dword [esp + 0x24], ebx
call fcn.00401650
add esp, 0x10
cmp ebx, dword [esp + 0x2c]
jl 0x41383b
mov eax, dword [esp + 0x28]
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x30]
jl 0x41346c
jmp 0x413b76
cmp dword [eax + 0x10], ebx
je 0x413b78
mov edx, dword [eax + 0x24]
mov ecx, dword [eax + 0x1c]
mov dword [esp + 0x20], ebx
mov ebx, dword [eax + 0x20]
mov dword [esp + 0x38], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x28], 0
test ebx, ebx
jle 0x413b76
fild dword [esp + 0x20]
mov edx, dword [esi + 0xbc]
fdiv qword [0x56a0a8]
fadd qword [0x56a050]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fstp dword [edx + 0x17c]
mov ecx, dword [esi + 0xbc]
call fcn.004023c0
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
push edi
push eax
lea ecx, [esp + 0x2c]
push str._s_d
push ecx
call fcn.00401650
mov edx, dword [esp + 0x34]
add esp, 0x10
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
add edi, dword [esp + 0x38]
push 0xc8
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0040bf30
call fcn.0040bf30
call fcn.0040bf30
xor edi, edi
mov dword [esp + 0x14], edi
cmp dword [esp + 0x2c], edi
jle 0x413b65
call fcn.0040bf30
mov eax, dword [esp + 0x24]
push edi
push eax
lea ecx, [esp + 0x20]
push str._s_d.bmp
push ecx
call fcn.00401650
mov al, byte [esi + 0xf0]
add esp, 0x10
test al, al
je 0x413a64
cmp al, 6
jne 0x413af3
movzx edx, word [esi + 0xec]
movzx eax, word [esi + 0xee]
imul eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
xor ecx, ecx
xor edi, edi
xor ebx, ebx
test eax, eax
jle 0x413aef
jmp 0x413a90
mov eax, dword [esi + 0x198]
movzx edx, byte [eax + edi]
mov byte [eax + ecx], dl
mov eax, dword [esi + 0x198]
movzx edx, byte [eax + edi + 1]
mov byte [eax + ecx + 1], dl
mov eax, dword [esi + 0x198]
movzx edx, byte [eax + edi + 2]
mov byte [eax + ecx + 2], dl
mov eax, dword [esi + 0x198]
movzx edx, byte [eax + edi + 3]
mov byte [eax + ecx + 3], dl
movzx edx, word [esi + 0xec]
movzx eax, word [esi + 0xee]
imul eax, edx
cdq
and edx, 3
add eax, edx
inc ebx
sar eax, 2
add ecx, 4
add edi, 5
cmp ebx, eax
jl 0x413a90
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx - 8]
mov eax, 1
sub eax, dword [ecx - 4]
or edx, eax
jge 0x413b15
push 0
lea ecx, [esp + 0x1c]
call fcn.004014e0
mov ecx, dword [esp + 0x18]
mov eax, dword [esi + 0x198]
movzx edx, word [esi + 0xee]
movzx ebx, word [esi + 0xec]
test eax, eax
je 0x413b3a
push edx
push ebx
push eax
mov edx, 8
call fcn.00406e40
mov eax, dword [esp + 0x28]
inc edi
push edi
push eax
lea ecx, [esp + 0x20]
push str.Step_d_Img_d
push ecx
mov dword [esp + 0x24], edi
call fcn.00401650
add esp, 0x10
cmp edi, dword [esp + 0x2c]
jl 0x413a35
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
inc eax
mov dword [esp + 0x28], eax
cmp eax, ebx
jl 0x4139ab
xor ebx, ebx
push ebx
push ebx
push str.Done_
mov dword [esi + 0x1d8], ebx
call fcn.00417747
mov byte [esp + 0x88], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x413bb2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x88], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413bda
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x88], 0xffffffff
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413c05
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret