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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x700bb0
push eax
mov dword fs:[0], esp
sub esp, 0x64
cmp edx, 0xe
push ebx
push ebp
push esi
push edi
mov ebp, ecx
jl 0x54620d
mov dword [esp + 0x14], 3
jmp 0x546228
cmp edx, 5
jl 0x54621c
mov dword [esp + 0x14], 2
jmp 0x546228
xor eax, eax
cmp edx, 4
setge al
mov dword [esp + 0x14], eax
mov cl, byte [esp + 0x84]
xor ebx, ebx
mov byte [esp + 0x3c], cl
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov edx, dword [ebp]
lea eax, [esp + 0x18]
push 4
push eax
mov ecx, ebp
mov dword [esp + 0x84], ebx
call dword [edx + 0x18]
cmp eax, 4
je 0x54627c
lea ecx, [esp + 0x30]
call fcn.006609ef
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], vtable.t_streambuf_read_failure.0
push 0x7878c0
push ecx
call fcn.006609b5
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
mov esi, edi
cmp eax, ebx
mov dword [esp + 0x18], esi
jne 0x546292
xor edx, edx
jmp 0x5462a9
mov ecx, dword [esp + 0x48]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, edi
jae 0x54631f
cmp edi, ebx
mov eax, edi
jge 0x5462b5
xor eax, eax
lea ecx, [eax + eax*2]
shl ecx, 3
push ecx
call fcn.00652710
mov edx, dword [esp + 0x48]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x40]
push esi
push edx
push eax
lea ecx, [esp + 0x48]
call fcn.00551720
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
push ecx
push edx
lea ecx, [esp + 0x44]
call fcn.005516f0
mov eax, dword [esp + 0x40]
push eax
call fcn.00652870
lea ecx, [edi + edi*2]
add esp, 4
lea edx, [esi + ecx*8]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x48], edx
call fcn.005516c0
lea eax, [eax + eax*2]
mov dword [esp + 0x40], esi
lea ecx, [esi + eax*8]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x44], ecx
lea edx, [esp + 0x12]
lea eax, [esp + 0x13]
push edx
push eax
lea ecx, [esp + 0x54]
call fcn.005506e0
cmp edi, ebx
mov byte [esp + 0x7c], 1
jle 0x54641c
lea edx, [esp + 0x30]
mov ecx, ebp
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.00423890
mov ecx, ebp
call fcn.0040fb60
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x4c]
push eax
mov dword [esp + 0x2c], edx
push ecx
push ebx
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.0053f480
mov eax, dword [esp + 0x20]
mov byte [esp + 0x7c], 2
cmp eax, ebx
je 0x54649a
lea edx, [esp + 0x24]
lea eax, [esp + 0x1c]
push edx
sub esp, 8
mov ecx, esp
mov dword [esp + 0x24], esp
push eax
call fcn.004f6600
lea ecx, [esp + 0x68]
call fcn.005464c0
mov ecx, dword [esp + 0x44]
push eax
push 1
push ecx
lea ecx, [esp + 0x48]
mov byte [esp + 0x88], 3
call fcn.00552660
lea ecx, [esp + 0x5c]
mov byte [esp + 0x7c], 2
call fcn.00554190
mov al, byte [esp + 0x1c]
dec esi
cmp al, bl
mov byte [esp + 0x7c], 1
je 0x546414
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x546414
mov edx, dword [eax + 4]
push 1
mov ecx, dword [edx + 4]
mov edx, dword [ecx + eax + 4]
lea ecx, [ecx + eax + 4]
call dword [edx]
cmp esi, ebx
jg 0x54633f
mov eax, dword [esp + 0x84]
mov edx, dword [esp + 0x40]
mov byte [esp + 0x7c], bl
mov ecx, dword [eax + 4]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x40], ecx
mov ecx, dword [eax + 8]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x44], ecx
mov ecx, dword [eax + 0xc]
mov dword [eax + 0xc], edx
mov dword [esp + 0x48], ecx
lea ecx, [esp + 0x4c]
call fcn.00550790
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
push eax
push ecx
lea ecx, [esp + 0x44]
mov dword [esp + 0x84], 0xffffffff
call fcn.005516f0
mov edx, dword [esp + 0x40]
push edx
call fcn.00652870
mov ecx, dword [esp + 0x78]
add esp, 4
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 4
lea ecx, [esp + 0x30]
call fcn.006609ef
lea eax, [esp + 0x30]
mov dword [esp + 0x30], vtable.t_editor_adventure_map::t_load_failure.0
push 0x7ae808
push eax
call fcn.006609b5
nop
nop
nop
nop
nop
nop