Function at 0x40c480
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 [0x431148]
mov eax, dword [esp + 0x74]
mov dword [esp + 0x4c], 0
test eax, eax
je 0x40c4e9
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 0x40c4e0
add ebx, edi
sub ebx, edx
add esi, 0x30
add ebx, ecx
cmp esi, ebp
jne 0x40c4b7
mov ebp, dword [esp + 0x70]
test ebp, ebp
jne 0x40c680
mov dword [esp + 0x3c], 2
mov dword [esp + 0x70], 2
mov esi, dword [esp + 0x3c]
mov dword [esp], esi
call fcn.0040bf80
mov dword [esp], esi
call fcn.0040bc60
test eax, eax
mov esi, eax
je 0x40c790
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.0040e080
test eax, eax
mov edi, eax
je 0x40c7d0
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 [0x43110c]
or dword [esi + 0x20], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], 2
mov dword [esp + 4], 0x42c0a2
mov dword [esp], eax
mov eax, edi
call fcn.0040c040
test eax, eax
je 0x40c778
mov ecx, dword [esp + 0x70]
lea edx, [esp + 0x4c]
mov dword [esp + 8], 2
mov dword [esp + 4], 0x42c0ca
mov dword [esp], ecx
mov ecx, eax
mov eax, edi
call fcn.0040c040
test eax, eax
je 0x40c7e6
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 0x40c601
jmp 0x40c74a
test eax, eax
mov dword [ebx + 0x1c], eax
je 0x40c766
add esi, 1
add ebx, 0x30
cmp esi, dword [esp + 0x74]
je 0x40c750
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.0040c040
mov edx, dword [esp + 0x4c]
cmp ebp, edx
jb 0x40c636
jne 0x40c5e6
cmp dword [esp + 0x38], esi
je 0x40c5e6
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.0040c010
mov dword [esp + 4], 1
mov dword [esp], 0x431180
call sub.msvcrt.dll_longjmp
lea esi, [esi]
mov eax, dword [0x431140]
mov dword [esp], eax
mov eax, dword [0x431144]
mov dword [esp + 4], eax
mov eax, dword [0x431148]
mov dword [esp + 8], eax
mov eax, dword [0x43114c]
mov dword [esp + 0xc], eax
mov eax, dword [0x431150]
mov dword [esp + 0x10], eax
mov eax, dword [0x431154]
mov dword [esp + 0x14], eax
mov eax, dword [0x431158]
mov dword [esp + 0x18], eax
mov eax, dword [0x43115c]
mov dword [esp + 0x1c], eax
mov eax, dword [0x431160]
mov dword [esp + 0x20], eax
mov eax, dword [0x431164]
mov dword [esp + 0x24], eax
mov eax, dword [0x431168]
mov dword [esp + 0x28], eax
mov eax, dword [0x43116c]
mov dword [esp + 0x2c], eax
mov eax, dword [0x431170]
mov dword [esp + 0x30], eax
mov eax, dword [0x431174]
mov dword [esp + 0x34], eax
call fcn.0040bf20
cmp eax, 0xffffffff
mov dword [esp + 0x3c], eax
jne 0x40c505
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.0040c010
mov esi, dword [0x4302e4]
test esi, esi
je 0x40c665
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 0x40c71f
mov dword [esp + 8], str.make_directory
mov dword [esp + 4], str.error:__s:_failed_to_add_._directory_n
jmp 0x40c71f
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.0040c010
mov ebx, dword [0x4302e4]
test ebx, ebx
jne 0x40c73d
jmp 0x40c665
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 0x40c7a8
mov dword [esp + 8], str.make_directory
mov dword [esp + 4], str.error:__s:_failed_to_add_.._directory_n
jmp 0x40c71f