Function at 0x409830
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, 0x18
sub esp, 0x5c
mov edi, dword [0x44d388]
mov eax, dword [esp + 0x74]
mov dword [esp + 0x4c], 0
test eax, eax
je 0x409899
mov eax, dword [esp + 0x74]
mov ebx, 0x18
mov esi, dword [esp + 0x78]
lea ebp, [eax + eax*2]
shl ebp, 4
add ebp, esi
mov eax, dword [esi + 8]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
xor edx, edx
add eax, 3
shr eax, 2
lea ecx, [eax*4 + 8]
mov eax, ebx
div edi
lea eax, [ecx + edx]
cmp eax, edi
jbe 0x409890
add ebx, edi
sub ebx, edx
add esi, 0x30
add ebx, ecx
cmp esi, ebp
jne 0x409867
mov ebp, dword [esp + 0x70]
test ebp, ebp
jne 0x409a30
mov dword [esp + 0x3c], 2
mov dword [esp + 0x70], 2
mov esi, dword [esp + 0x3c]
mov dword [esp], esi
call fcn.00409320
mov dword [esp], esi
call fcn.00409000
test eax, eax
mov esi, eax
je 0x409b40
lea eax, [ebx + edi - 1]
xor edx, edx
div edi
xor edx, edx
mov dword [esp + 0x10], edx
mov dword [esp + 8], edx
mov dword [esp], esi
mov ebp, eax
imul ebp, edi
mov dword [esp + 0xc], ebp
mov dword [esp + 4], ebp
call fcn.0040c760
test eax, eax
mov edi, eax
je 0x409b80
movzx eax, word [esp + 0x7c]
mov ecx, 0x4000
mov word [esi], cx
lea edx, [esp + 0x4c]
xor ecx, ecx
add eax, 2
mov word [esi + 0x1a], ax
mov eax, dword [0x44d34c]
or dword [esi + 0x20], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], 2
mov dword [esp + 4], 0x442da2
mov dword [esp], eax
mov eax, edi
call fcn.004093e0
test eax, eax
je 0x409b28
mov ecx, dword [esp + 0x70]
lea edx, [esp + 0x4c]
mov dword [esp + 8], 2
mov dword [esp + 4], 0x442dca
mov dword [esp], ecx
mov ecx, eax
mov eax, edi
call fcn.004093e0
test eax, eax
je 0x409b96
mov ecx, dword [esp + 0x74]
xor esi, esi
mov edx, dword [esp + 0x74]
mov ebx, dword [esp + 0x78]
sub ecx, 1
test edx, edx
mov dword [esp + 0x38], ecx
jne 0x4099b1
jmp 0x409afa
test eax, eax
mov dword [ebx + 0x1c], eax
je 0x409b16
add esi, 1
add ebx, 0x30
cmp esi, dword [esp + 0x74]
je 0x409b00
movzx edx, byte [ebx + 0x14]
mov ecx, eax
mov eax, edi
mov dword [esp + 8], edx
mov edx, dword [ebx + 8]
mov dword [esp], 0
mov dword [esp + 4], edx
lea edx, [esp + 0x4c]
call fcn.004093e0
mov edx, dword [esp + 0x4c]
cmp ebp, edx
jb 0x4099e6
jne 0x409996
cmp dword [esp + 0x38], esi
je 0x409996
mov edx, ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], edx
mov eax, dword [ebx + 8]
mov dword [esp + 8], str.make_directory
mov dword [esp + 4], str.critical_error:__s:_internal_error:_dentry_for__s_ends_at__d__past__d_n_n
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.004093b0
mov dword [esp + 4], 1
mov dword [esp], 0x44d3c0
call sub.msvcrt.dll_longjmp
lea esi, [esi]
mov eax, dword [0x44d380]
mov dword [esp], eax
mov eax, dword [0x44d384]
mov dword [esp + 4], eax
mov eax, dword [0x44d388]
mov dword [esp + 8], eax
mov eax, dword [0x44d38c]
mov dword [esp + 0xc], eax
mov eax, dword [0x44d390]
mov dword [esp + 0x10], eax
mov eax, dword [0x44d394]
mov dword [esp + 0x14], eax
mov eax, dword [0x44d398]
mov dword [esp + 0x18], eax
mov eax, dword [0x44d39c]
mov dword [esp + 0x1c], eax
mov eax, dword [0x44d3a0]
mov dword [esp + 0x20], eax
mov eax, dword [0x44d3a4]
mov dword [esp + 0x24], eax
mov eax, dword [0x44d3a8]
mov dword [esp + 0x28], eax
mov eax, dword [0x44d3ac]
mov dword [esp + 0x2c], eax
mov eax, dword [0x44d3b0]
mov dword [esp + 0x30], eax
mov eax, dword [0x44d3b4]
mov dword [esp + 0x34], eax
call fcn.004092c0
cmp eax, 0xffffffff
mov dword [esp + 0x3c], eax
jne 0x4098b5
mov dword [esp + 8], str.make_directory
mov dword [esp + 4], str.error:__s:_failed_to_allocate_inode_n_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.004093b0
mov esi, dword [0x44c528]
test esi, esi
je 0x409a15
add esp, 0x5c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x4c]
nop
add bp, word [eax + 4]
sub ebp, edx
mov word [eax + 4], bp
mov eax, dword [esp + 0x3c]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], str.make_directory
mov dword [esp + 4], str.error:__s:_failed_to_add_directory_n
jmp 0x409acf
mov dword [esp + 8], str.make_directory
mov dword [esp + 4], str.error:__s:_failed_to_add_._directory_n
jmp 0x409acf
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], str.make_directory
mov dword [esp + 4], str.error:__s:_failed_to_get_inode__u_n
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.004093b0
mov ebx, dword [0x44c528]
test ebx, ebx
jne 0x409aed
jmp 0x409a15
mov dword [esp + 0xc], ebp
mov dword [esp + 8], str.make_directory
mov dword [esp + 4], str.error:__s:_failed_to_allocate__u_extents_n
jmp 0x409b58
mov dword [esp + 8], str.make_directory
mov dword [esp + 4], str.error:__s:_failed_to_add_.._directory_n
jmp 0x409acf