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

Disassembly:
sub esp, 0x4c
mov eax, dword [0x10156440]
xor eax, esp
mov dword [esp + 0x44], eax
push ebx
push ebp
mov ebp, dword [esp + 0x5c]
mov eax, edx
push esi
push edi
mov edi, dword [esp + 0x60]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x40], ebp
test edi, edi
jne 0x100470bb
push str.index
push str.invalid_argument
push 0x1013afe8
push 3
call fcn.10028180
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.100f4277
add esp, 0x4c
ret
test ebp, ebp
jne 0x100470c6
push str.file
jmp 0x10047091
mov dword [eax], 0x14
mov esi, dword [edi + 0xc0]
cmp esi, 3
ja 0x10047124
xor ecx, ecx
xor ebx, ebx
cmp dword [edi + 0x50], ecx
jbe 0x10047119
mov ebp, 0xbfff
mov eax, dword [edi + 0x4c]
mov esi, dword [eax + ecx*4]
mov ax, bp
and ax, word [esi + 0x3c]
movzx edx, ax
mov word [esi + 0x3c], ax
mov eax, 0x6000
test word [esi + 0x3e], ax
je 0x1004710f
inc ebx
or edx, 0x4000
mov word [esi + 0x3c], dx
inc ecx
cmp ecx, dword [edi + 0x50]
jb 0x100470e5
mov ebp, dword [esp + 0x40]
xor eax, eax
cmp eax, ebx
sbb esi, esi
neg esi
add esi, 2
push 0x44495243
call dword [sym.imp.WS2_32.dll_htonl]
push esi
mov dword [esp + 0x4c], eax
call dword [sym.imp.WS2_32.dll_htonl]
push dword [edi + 0x50]
mov dword [esp + 0x50], eax
call dword [sym.imp.WS2_32.dll_htonl]
push 0xc
lea edx, [esp + 0x4c]
mov dword [esp + 0x54], eax
mov ecx, ebp
call fcn.10037ce0
add esp, 4
test eax, eax
js 0x100470a5
mov edx, ebp
mov ecx, edi
call fcn.10046b20
test eax, eax
js 0x100470a5
mov edx, dword [edi + 0x78]
test edx, edx
je 0x10047225
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0x1015ddcd
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
call fcn.1009fec0
mov eax, dword [esp + 0x14]
cmp eax, 0x1015ddcc
jne 0x100471b8
xor ebx, ebx
cmp eax, 0x1015ddcc
setne bl
dec ebx
jmp 0x1004721d
mov eax, dword [0x1013b604]
push dword [esp + 0x1c]
mov dword [esp + 0x44], eax
call dword [sym.imp.WS2_32.dll_htonl]
push 8
lea edx, [esp + 0x44]
mov dword [esp + 0x48], eax
mov ecx, ebp
call fcn.10037ce0
mov edx, dword [esp + 0x18]
add esp, 4
mov ecx, ebp
push dword [esp + 0x1c]
call fcn.10037ce0
add esp, 4
mov ebx, eax
cmp dword [esp + 0x18], 0
jbe 0x1004721d
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1004721d
cmp eax, 0x1015ddcc
je 0x1004721d
mov esi, dword [method.std::basic_streambuf_char__struct_std::char_traits_char__.virtual_4]
mov ecx, esi
push eax
call dword [0x101182f8]
call esi
add esp, 4
test ebx, ebx
js 0x100470a5
cmp dword [edi + 0x94], 0
jbe 0x100472dd
mov dword [esp + 0x20], 0x1015ddcd
xor esi, esi
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
nop dword [eax]
mov eax, dword [edi + 0x90]
lea ecx, [esp + 0x20]
mov edx, dword [eax + esi*4]
call fcn.10046ce0
test eax, eax
js 0x100470a5
inc esi
cmp esi, dword [edi + 0x94]
jb 0x10047250
mov eax, dword [0x1013b600]
mov esi, dword [esp + 0x28]
push esi
mov dword [esp + 0x44], eax
call dword [sym.imp.WS2_32.dll_htonl]
push 8
lea edx, [esp + 0x44]
mov dword [esp + 0x48], eax
mov ecx, ebp
call fcn.10037ce0
add esp, 4
mov ecx, ebp
push esi
mov esi, dword [esp + 0x24]
mov edx, esi
call fcn.10037ce0
add esp, 4
mov ebx, eax
cmp dword [esp + 0x24], 0
jbe 0x100472d5
test esi, esi
je 0x100472d5
cmp esi, 0x1015ddcc
je 0x100472d5
push esi
mov esi, dword [method.std::basic_streambuf_char__struct_std::char_traits_char__.virtual_4]
mov ecx, esi
call dword [0x101182f8]
call esi
add esp, 4
test ebx, ebx
js 0x100470a5
cmp dword [edi + 0xa8], 0
jbe 0x1004739d
mov dword [esp + 0x2c], 0x1015ddcd
xor esi, esi
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [edi + 0xa4]
lea ecx, [esp + 0x2c]
mov edx, dword [eax + esi*4]
call fcn.10046e80
test eax, eax
js 0x100470a5
inc esi
cmp esi, dword [edi + 0xa8]
jb 0x10047310
mov eax, dword [str.REUC]
mov esi, dword [esp + 0x34]
push esi
mov dword [esp + 0x44], eax
call dword [sym.imp.WS2_32.dll_htonl]
push 8
lea edx, [esp + 0x44]
mov dword [esp + 0x48], eax
mov ecx, ebp
call fcn.10037ce0
add esp, 4
mov ecx, ebp
push esi
mov esi, dword [esp + 0x30]
mov edx, esi
call fcn.10037ce0
add esp, 4
mov ebx, eax
cmp dword [esp + 0x30], 0
jbe 0x10047395
test esi, esi
je 0x10047395
cmp esi, 0x1015ddcc
je 0x10047395
push esi
mov esi, dword [method.std::basic_streambuf_char__struct_std::char_traits_char__.virtual_4]
mov ecx, esi
call dword [0x101182f8]
call esi
add esp, 4
test ebx, ebx
js 0x100470a5
mov ecx, dword [esp + 0x38]
mov edx, ebp
call fcn.10037a90
mov eax, dword [esp + 0x3c]
mov ecx, ebp
mov edx, dword [esp + 0x38]
push dword [eax]
call fcn.10037ce0
add esp, 4
test eax, eax
js 0x100470a5
mov ecx, edi
call fcn.10047030
mov ecx, dword [esp + 0x54]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100f4277
add esp, 0x4c
ret