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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebp, dword [esp + 0x80]
mov edi, dword [esp + 0x84]
mov eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
mov dword [esp + 0x5c], eax
xor eax, eax
cmp dword [ebp + 0x6c], 1
mov dword [esp + 0x30], edi
je 0x404e30
mov eax, dword [edi + 0x30]
cmp dword [ebp + 0x64], eax
jne 0x404c7e
mov edx, dword [edi + 0x2c]
cmp dword [ebp + 0x68], edx
je 0x404c93
mov dword [ebp + 0x64], eax
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 0x2c]
mov dword [ebp + 0x68], eax
mov dword [esp], ebp
call fcn.00404a30
call fcn.0040bc40
lea edi, [ebp + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0x60]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x48], edi
cmp eax, 0x1e
jbe 0x404e48
mov edx, dword [ebp + 0x14]
mov byte [ebp + 0x51], 1
mov dword [esp + 0x34], edx
cmp eax, 0x50
jbe 0x4052a4
mov byte [ebp + 0x50], 1
cmp dword [ebp + 0x54], 0xa
jbe 0x404cd5
mov byte [ebp + 0x50], 1
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
add eax, 0xffffff6a
adc edx, 0xffffffff
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
mov edi, dword [esp + 0x48]
cmp dword [esp + 0x34], edi
je 0x404d8c
mov edi, dword [esp + 0x34]
mov edx, dword [edi]
mov eax, dword [edi + 8]
mov dword [esp + 0x24], edi
mov dword [esp + 0x34], edx
test eax, eax
js 0x404d1d
mov edx, dword [esp + 0x30]
cmp eax, dword [edx + 0x30]
jl 0x404e70
mov edi, dword [esp + 0x24]
mov dword [esp], edi
call fcn.00451070
mov ebx, dword [edi + 0x10]
mov esi, dword [edi + 0xc]
cmp ebx, esi
je 0x404d4d
lea esi, [esi]
nop
mov eax, dword [esi]
mov dword [esp], esi
add esi, 0x48
call dword [eax]
cmp ebx, esi
jne 0x404d38
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 0xc]
test esi, esi
je 0x404d6a
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x14]
mov dword [esp], esi
mov dword [esp + 0x28], eax
sub eax, esi
mov dword [esp + 4], eax
call sub.cygstdc_6.dll_operator_delete_void__unsigned_int_
mov eax, dword [esp + 0x24]
mov dword [esp + 4], 0x18
mov dword [esp], eax
call sub.cygstdc_6.dll_operator_delete_void__unsigned_int_
mov edi, dword [esp + 0x48]
cmp dword [esp + 0x34], edi
jne 0x404cfb
mov ebx, dword [ebp + 0x1c]
lea esi, [ebp + 0x1c]
cmp ebx, esi
je 0x404e30
mov ecx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x38]
cmp byte [ecx + 0x1c], 0
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x3c]
je 0x40522e
mov edx, dword [ecx + 0x30]
mov edi, dword [esp + 0x30]
mov dword [esp + 0x34], edx
mov dword [esp + 0x28], edi
cmp edx, dword [edi + 0x30]
jge 0x404dfd
mov edx, dword [ecx + 0x18]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x28], edx
cmp edx, dword [edi + 0x2c]
jge 0x404dfd
mov edx, dword [esp + 0x24]
cmp edx, dword [ecx + 0x10]
mov edx, eax
sbb edx, dword [ecx + 0x14]
jb 0x40522e
mov edx, dword [esp + 0x28]
cmp edx, dword [edi + 0x34]
jne 0x404dfd
mov edx, dword [esp + 0x34]
cmp edx, dword [edi + 0x38]
je 0x40522e
cmp dword [ebp + 0x6c], 3
jne 0x4051c7
mov edi, ebx
mov ebx, dword [ebx]
mov eax, dword [edi + 8]
lea edx, [edi + 8]
mov dword [esp], edx
call dword [eax]
mov dword [esp + 4], 0x38
mov dword [esp], edi
call sub.cygstdc_6.dll_operator_delete_void__unsigned_int_
cmp esi, ebx
jne 0x404e07
mov dword [ebp + 0x20], esi
mov dword [ebp + 0x1c], esi
mov eax, dword [esp + 0x5c]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x4052f5
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [ebp + 0x14]
cmp byte [ebp + 0x51], 0
mov dword [esp + 0x34], edi
je 0x404e5e
cmp eax, 0x14
jbe 0x4051ea
mov byte [ebp + 0x50], 0
jmp 0x404ccb
mov ebx, dword [edi + 0xc]
cmp ebx, dword [edi + 0x10]
je 0x404ced
lea esi, [esi]
mov esi, dword [ebp + 0x38]
mov edi, dword [ebp + 0x3c]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edi
mov esi, dword [ebp + 0x30]
mov edi, dword [ebp + 0x34]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004040e0
mov ecx, eax
cmp eax, 2
je 0x404fbd
ja 0x405030
test eax, eax
je 0x4050a0
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebp + 0x4c]
mov ecx, dword [ebx + 0x18]
cmp dword [ebp + 0x48], ecx
sbb eax, edx
jae 0x404edf
mov dword [ebp + 0x48], ecx
mov dword [ebp + 0x4c], edx
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
mov ecx, 0xf9
mov eax, esi
mov edx, edi
sub eax, dword [ebx + 0x20]
sbb edx, dword [ebx + 0x24]
mov dword [esp + 0x28], eax
xor eax, eax
cmp ecx, dword [esp + 0x28]
mov dword [esp + 0x2c], edx
sbb eax, dword [esp + 0x2c]
jb 0x404f40
mov eax, dword [ebp + 0x54]
mov dword [esp + 0x28], eax
test eax, eax
je 0x404f40
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
cmp edx, dword [ebp + 0x58]
mov eax, ecx
sbb eax, dword [ebp + 0x5c]
jb 0x404f40
mov eax, dword [esp + 0x28]
mov dword [ebp + 0x58], esi
mov dword [ebp + 0x5c], edi
sub eax, 1
mov dword [ebp + 0x54], eax
lea esi, [esi]
nop
mov eax, dword [esp + 0x24]
mov edx, dword [ebx + 0x10]
mov ecx, dword [eax + 8]
cmp ecx, 0xffffffff
jne 0x404f56
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0x38]
cmp edx, 0xffffffff
jne 0x404f62
mov eax, dword [esp + 0x30]
mov edx, dword [eax + 0x34]
mov eax, dword [esp + 0x30]
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x28], eax
sub eax, esi
sar eax, 3
cmp ecx, eax
jae 0x4052cd
mov eax, dword [esi + ecx*8]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub eax, ecx
sar eax, 2
imul eax, eax, 0xaaaaaaab
cmp edx, eax
jae 0x4052e1
lea eax, [edx + edx*2]
lea ecx, [ecx + eax*4]
mov eax, dword [esp + 0x24]
mov edx, dword [eax + 0x10]
mov eax, ebx
cmp edx, ebx
je 0x404fbd
lea esi, [esi]
mov esi, dword [ecx + 4]
add eax, 0x48
mov dword [eax - 0x1c], esi
cmp edx, eax
jne 0x404fb0
mov ecx, dword [ebx + 0x38]
mov edi, dword [ebx + 0x3c]
mov byte [ebx + 0x34], 0
cmp ecx, edi
je 0x404ff6
mov dword [esp + 0x28], ecx
mov esi, ecx
lea esi, [esi]
mov eax, dword [esi]
lea edx, [eax - 0xc]
cmp eax, method.std::string.swap_std::string_
jne 0x405070
add esi, 0xc
cmp edi, esi
jne 0x404fd8
mov ecx, dword [esp + 0x28]
mov dword [ebx + 0x3c], ecx
mov dword [ebx + 0x18], 0xffffffff
mov dword [ebx + 0x1c], 0xffffffff
mov dword [ebx + 8], 0xffffffff
mov dword [ebx + 0xc], 0xffffffff
mov byte [ebx + 0x14], 0
mov eax, dword [esp + 0x24]
add ebx, 0x48
cmp dword [eax + 0x10], ebx
je 0x404ced
mov eax, dword [eax + 8]
jmp 0x404e80
cmp eax, 3
jne 0x405016
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebp + 0x4c]
mov ecx, dword [ebx + 0x18]
cmp dword [ebp + 0x48], ecx
sbb eax, edx
mov esi, dword [ebp + 0x6c]
jae 0x4050d0
cmp esi, 3
je 0x405168
mov eax, dword [esp + 0x30]
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp], ebp
call 0x404780
jmp 0x405016
mov ecx, 0xffffffff
lock xadd dword [eax - 4], ecx
test ecx, ecx
jg 0x404fe8
lea eax, [esp + 0x5b]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00451180
jmp 0x404fe8
mov eax, dword [esp + 0x38]
mov esi, 0x1387
sub eax, dword [ebx + 0x20]
mov edi, ecx
mov edx, dword [esp + 0x3c]
sbb edx, dword [ebx + 0x24]
cmp esi, eax
sbb edi, edx
jae 0x405140
mov dword [ebp + 0x54], 0x14
jmp 0x405016
cmp esi, 3
jne 0x4051c7
mov ecx, dword [ebx + 0x38]
mov edi, dword [ebx + 0x3c]
mov byte [ebx + 0x34], 0
cmp ecx, edi
je 0x404ff6
mov esi, ecx
mov dword [esp + 0x28], ecx
mov eax, dword [esi]
lea edx, [eax - 0xc]
cmp eax, method.std::string.swap_std::string_
jne 0x405117
lea esi, [esi]
add esi, 0xc
cmp edi, esi
je 0x404fef
mov eax, dword [esi]
lea edx, [eax - 0xc]
cmp eax, method.std::string.swap_std::string_
je 0x405100
mov ecx, 0xffffffff
lock xadd dword [eax - 4], ecx
test ecx, ecx
jg 0x405100
lea eax, [esp + 0x5b]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00451180
jmp 0x405100
mov esi, 0xf9
cmp esi, eax
sbb ecx, edx
jae 0x405016
cmp dword [ebp + 0x54], 9
ja 0x405016
mov dword [ebp + 0x54], 0xa
jmp 0x405016
mov ecx, dword [ebx + 0x38]
mov edi, dword [ebx + 0x3c]
mov byte [ebx + 0x34], 0
cmp ecx, edi
je 0x404ff6
mov dword [esp + 0x28], ebx
mov esi, ecx
mov eax, dword [esi]
lea edx, [eax - 0xc]
cmp eax, method.std::string.swap_std::string_
jne 0x40519f
add esi, 0xc
cmp edi, esi
jne 0x405180
mov ebx, dword [esp + 0x28]
mov dword [ebx + 0x3c], ecx
jmp 0x404ff6
mov ebx, 0xffffffff
lock xadd dword [eax - 4], ebx
test ebx, ebx
jg 0x40518c
lea eax, [esp + 0x5b]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 0x4c], ecx
call fcn.00451180
mov ecx, dword [esp + 0x4c]
jmp 0x40518c
mov eax, dword [esp + 0x5c]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x4052f5
mov dword [esp + 0x80], ebp
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00404a30
lea eax, [ebp + 0x1c]
cmp dword [ebp + 0x1c], eax
jne 0x404e5e
cmp dword [esp + 0x48], edi
je 0x4052c4
mov ecx, edi
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 0x10]
cmp eax, edx
jne 0x405223
jmp 0x4052b8
add eax, 0x48
cmp eax, edx
je 0x4052b8
cmp byte [eax + 0x14], 0
je 0x405218
jmp 0x404e5e
mov edx, dword [esp + 0x24]
mov ecx, esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x24], eax
jmp 0x40524c
mov eax, dword [ebp + 0x3c]
mov edx, dword [ebp + 0x38]
mov ebx, edi
mov dword [esp + 0x24], eax
cmp byte [ebx + 0x1c], 0
mov edi, dword [ebx]
je 0x405270
mov eax, dword [esi + 0x30]
cmp dword [ebx + 0x30], eax
jge 0x405270
mov eax, dword [esi + 0x2c]
cmp dword [ebx + 0x18], eax
jge 0x405270
mov eax, dword [esp + 0x24]
cmp edx, dword [ebx + 0x10]
sbb eax, dword [ebx + 0x14]
jb 0x40529b
mov dword [esp], ebx
mov dword [esp + 0x24], ecx
call fcn.00451070
mov eax, dword [ebx + 8]
lea edx, [ebx + 8]
mov dword [esp], edx
call dword [eax]
mov dword [esp + 4], 0x38
mov dword [esp], ebx
call sub.cygstdc_6.dll_operator_delete_void__unsigned_int_
mov ecx, dword [esp + 0x24]
cmp ecx, edi
jne 0x405240
jmp 0x404e30
cmp eax, 0x32
ja 0x404ccb
jmp 0x404e5e
mov ecx, dword [ecx]
cmp ecx, dword [esp + 0x48]
jne 0x405202
mov byte [ebp + 0x51], 0
jmp 0x404e5e
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], 0x476ff0
call fcn.00450fe0
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 0x476ff0
call fcn.00450fe0
call sub.cygwin1.dll___stack_chk_fail
lea esi, [esi]
sub esp, 0x1c
mov edx, dword [sym.imp.cygwin1.dll___stack_chk_guard]
mov dword [esp + 0xc], edx
xor edx, edx
mov eax, dword [esp + 0x20]
cmp dword [eax + 0x6c], 3
je 0x405321
add dword [eax + 0x40], 1
adc dword [eax + 0x44], 0
mov eax, dword [esp + 0xc]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x405331
add esp, 0x1c
ret
call sub.cygwin1.dll___stack_chk_fail
lea esi, [esi]
lea esi, [esi]