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

Disassembly:
push 0xffffffffffffffff
push 0x46ea68
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
push ebp
push esi
push edi
mov edi, dword [0x48f0a4]
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 0x1c], edi
je 0x40fb12
lea eax, [esp + 0x14]
push 4
push eax
mov ecx, 0x48efa8
call fcn.0040df80
push 0x488494
lea ecx, [esp + 0x18]
mov dword [esp + 0x84], ebx
call fcn.004622d5
mov ecx, dword [esp + 0x14]
push ebx
push ecx
call dword [0x4732ec]
push 0x48790c
lea ecx, [esp + 0x18]
call fcn.004622d5
mov edx, dword [str.sys.sav]
lea ecx, [esp + 0x14]
push edx
call fcn.004622d5
lea ecx, [esp + 0x30]
call fcn.0046547b
mov eax, dword [esp + 0x14]
push ebx
push 0x1001
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x8c], 1
call fcn.0046562d
test eax, eax
je 0x40faee
lea ecx, [esp + 0x20]
push 4
push ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x28], 0xa
call fcn.00465784
push 0xa
push 0x48f1ec
lea ecx, [esp + 0x38]
call fcn.00465784
lea edx, [esp + 0x13]
push 1
push edx
lea ecx, [esp + 0x38]
mov byte [esp + 0x1b], 2
call fcn.00465784
mov eax, dword [0x48f090]
push 4
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x38]
call fcn.00465784
mov eax, dword [esp + 0x18]
xor esi, esi
cmp eax, ebx
jle 0x40facd
mov ebp, vtable.org::CString.0
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x40], ebp
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x4c], ebp
push ebx
push ebx
push ebx
lea ecx, [esp + 0x64]
mov byte [esp + 0x8c], 3
call fcn.0040d900
mov byte [esp + 0x5c], bl
lea ecx, [esp + 0x40]
mov byte [esp + 0x80], 4
test ecx, ecx
je 0x40fa55
cmp esi, ebx
jl 0x40fa55
cmp esi, dword [0x48f090]
jge 0x40fa55
mov edx, dword [0x48f088]
lea ecx, [esp + 0x40]
mov eax, dword [edx + esi*4]
push eax
call fcn.0040deb0
mov ecx, dword [esp + 0x58]
lea edx, [esp + 0x20]
mov dword [esp + 0x20], ecx
push 4
push edx
lea ecx, [esp + 0x38]
call fcn.00465784
lea eax, [esp + 0x5c]
push 1
push eax
lea ecx, [esp + 0x38]
call fcn.00465784
lea ecx, [esp + 0x60]
push 0x18
push ecx
lea ecx, [esp + 0x38]
call fcn.00465784
mov edi, vtable.org::CBuffer.0
lea ecx, [esp + 0x4c]
mov byte [esp + 0x80], 5
mov dword [esp + 0x4c], edi
call fcn.0040c4a0
lea ecx, [esp + 0x40]
mov byte [esp + 0x80], 1
mov dword [esp + 0x40], edi
call fcn.0040c4a0
mov eax, dword [esp + 0x18]
inc esi
cmp esi, eax
jl 0x40f9f6
mov edi, dword [esp + 0x1c]
mov edi, dword [edi + 0x164]
lea ebp, [edi + edi]
push ebp
call fcn.00461d88
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x40fb27
lea ecx, [esp + 0x30]
call fcn.00465848
lea ecx, [esp + 0x30]
mov byte [esp + 0x80], bl
call fcn.00465570
lea ecx, [esp + 0x14]
mov dword [esp + 0x80], 0xffffffff
call fcn.00462047
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
add esp, 0x74
ret
xor eax, eax
cmp edi, ebx
jle 0x40fb50
mov ecx, dword [esp + 0x1c]
cmp eax, dword [ecx + 0x164]
jl 0x40fb3d
xor ecx, ecx
jmp 0x40fb47
mov edx, dword [ecx + 0x160]
mov cx, word [edx + eax*2]
mov word [esi + eax*2], cx
inc eax
cmp eax, edi
jl 0x40fb2d
lea eax, [esp + 0x20]
push 4
push eax
lea ecx, [esp + 0x38]
mov dword [esp + 0x28], ebp
call fcn.00465784
mov ecx, dword [esp + 0x20]
push ecx
push esi
lea ecx, [esp + 0x38]
call fcn.00465784
push esi
call fcn.00461db1
add esp, 4
lea ecx, [esp + 0x30]
call fcn.004657fe
lea edx, [esp + 0x18]
push 4
push edx
lea ecx, [esp + 0x38]
mov esi, eax
mov dword [esp + 0x20], ebx
call fcn.00465784
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
call fcn.004478e0
lea ecx, [esp + 0x30]
call fcn.004657fe
push ebx
push esi
lea ecx, [esp + 0x38]
mov edi, eax
call fcn.004657cf
mov ecx, edi
lea edx, [esp + 0x18]
sub ecx, esi
push 4
sub ecx, 4
push edx
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x38]
call fcn.00465784
push ebx
push edi
lea ecx, [esp + 0x38]
call fcn.004657cf
mov esi, dword [0x48f0ec]
cmp esi, ebx
mov dword [esp + 0x18], esi
jl 0x40fcdf
mov ebp, vtable.org::CBuffer.0
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebx
lea ecx, [esp + 0x24]
mov byte [esp + 0x80], 6
call dword [0x4738d8]
lea eax, [esi + 1]
push eax
call fcn.00461d88
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [esp + 0x28], edi
je 0x40fc72
mov ecx, esi
xor eax, eax
mov edx, ecx
mov dword [esp + 0x2c], esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x28]
mov byte [eax + esi], bl
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x28]
xor eax, eax
cmp ecx, ebx
jle 0x40fc98
cmp eax, ebx
jl 0x40fc8a
cmp dword [0x48f0ec], eax
jle 0x40fc8a
mov ecx, dword [0x48f0e8]
mov cl, byte [eax + ecx]
jmp 0x40fc8c
lea ecx, [esp + 0x24]
mov byte [esp + 0x80], 1
mov dword [esp + 0x24], ebp
call dword [0x473938]
jmp 0x40fcdf
xor cl, cl
mov byte [eax + esi], cl
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
jl 0x40fc5b
lea edx, [esp + 0x18]
push 4
push edx
lea ecx, [esp + 0x38]
call fcn.00465784
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x30]
push eax
push esi
call fcn.00465784
mov eax, dword [esp + 0x28]
mov byte [esp + 0x80], 1
cmp eax, ebx
mov dword [esp + 0x24], ebp
je 0x40fcd4
push eax
call fcn.00461db1
add esp, 4
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x24]
call dword [edx + 0x68]
lea ecx, [esp + 0x30]
call fcn.00465848
lea ecx, [esp + 0x30]
mov byte [esp + 0x80], bl
call fcn.00465570
lea ecx, [esp + 0x14]
mov dword [esp + 0x80], 0xffffffff
call fcn.00462047
mov ecx, dword [esp + 0x78]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x74
ret