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

Disassembly:
sub esp, 0x19c
mov eax, dword [0x65ada4]
xor eax, esp
mov dword [esp + 0x198], eax
mov eax, dword [esp + 0x1a4]
push ebx
mov ebx, dword [esp + 0x1a4]
push ebp
mov ebp, dword [ebx]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x47]
add eax, 0x24
push esi
mov esi, dword [esp + 0x1b4]
mov dword [esp + 0x20], ecx
mov cl, byte [ebx + 8]
mov dword [esp + 0x54], eax
mov eax, dword [ebp + 0xed]
push edi
mov dword [esp + 0x54], edx
mov dword [esp + 0x5c], eax
xor edi, edi
mov byte [esp + 0x1b], 0
mov byte [esp + 0x38], cl
mov byte [esp + 0x13], 1
call fcn.0046f2a0
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x7a], edi
mov dword [esp + 0x76], edi
mov dword [esp + 0x96], edi
mov dword [esp + 0x92], edi
mov dword [esp + 0x3c], edi
mov byte [esp + 0x75], 0
mov byte [esp + 0x34], 0
mov byte [esp + 0x9b], 0
mov byte [esp + 0x9a], 0
cmp eax, edi
je 0x4f5942
mov byte [eax], 0
cmp byte [ebp + 0xcf], 0
mov byte [esp + 0x40], 0
mov dword [esp + 0x2c], esi
je 0x4f595a
movsx eax, word [ebp + 0x30]
jmp 0x4f595f
mov eax, 1
mov dword [esp + 0x20], eax
mov dword [ebx + 0x13], eax
mov al, byte [ebx + 0x17]
mov byte [esp + 0x2b], al
cmp al, 3
je 0x4f59c1
movzx ecx, word [esi]
movsx eax, cx
cdq
sub eax, edx
sar eax, 1
movzx edx, word [esi + eax*2 - 2]
cmp dx, cx
jl 0x4f5989
dec eax
jmp 0x4f598c
movsx eax, dx
movsx edx, word [esi + eax*2]
mov eax, dword [0x6d3944]
add eax, 0xfffffff8
cmp edx, eax
jle 0x4f59c1
movsx ecx, byte [esp + 0x2b]
mov edx, dword [esp + 0x20]
push ecx
push edx
push esi
push 0x3fb
push 0xf
call fcn.00406f10
add esp, 0x14
mov eax, 0xf
jmp 0x4f6248
cmp dword [ebx + 0x13], edi
jge 0x4f59e0
mov dword [ebp + 0x263], edi
call fcn.004f0dd0
mov esi, eax
test esi, esi
jne 0x4f6078
jmp 0x4f5a77
cmp byte [esp + 0x1bc], 0
jne 0x4f5a52
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
add eax, 0xd4
push eax
lea ecx, [esp + 0x64]
push ecx
lea edi, [ebx + 0xb]
push edi
push 0
push edx
lea eax, [ebp + 0x10]
push eax
push ebp
call fcn.004ebaf0
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x4f6078
mov eax, dword [esp + 0x60]
test eax, eax
jle 0x4f5a3b
mov ecx, dword [edi]
mov edx, dword [ebx + 4]
push ecx
push edx
push eax
push ebx
call fcn.0059d730
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x4f6078
cmp byte [esp + 0x13], 0
mov dword [ebp + 0x263], 1
je 0x4f5a77
mov byte [ebp + 0x44], 1
jmp 0x4f5a77
mov eax, dword [ebx + 0xb]
mov ecx, dword [ebx + 4]
push eax
push ecx
lea edx, [ebp + 0x10]
push edx
push ebp
call fcn.004eb470
mov esi, eax
add esp, 0x10
cmp esi, edi
jne 0x4f6078
mov dword [ebp + 0x263], edi
cmp byte [ebx + 9], 0
mov edx, dword [ebx + 0xb]
mov dword [esp + 0x20], edx
je 0x4f5ba9
cmp byte [ebx + 0x17], 1
mov byte [esp + 0x50], 0
jne 0x4f5a97
xor al, al
jmp 0x4f5aba
cmp byte [esp + 0x38], 0
je 0x4f5aa8
mov eax, dword [ebx + 0xf]
movzx eax, word [edx + eax*8 + 0x2c]
jmp 0x4f5ab0
mov ecx, dword [ebx + 0xf]
movzx eax, word [edx + ecx*2 + 0x2c]
mov cx, word [0x6d3980]
shr ax, cl
mov byte [esp + 0x75], al
lea esi, [ebp + 0x167]
mov ecx, 0x2b
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
mov byte [esp + 0x34], al
mov eax, dword [ebx + 0xf]
movsw word es:[edi], word [esi]
test eax, eax
jg 0x4f5af0
cmp byte [ebx + 0x17], 1
jne 0x4f5ae9
test eax, eax
je 0x4f5af0
xor edi, edi
jmp 0x4f5b73
cmp byte [esp + 0x38], 0
movzx esi, word [0x6d3930]
je 0x4f5b05
movzx ecx, word [edx + eax*8 + 0x24]
jmp 0x4f5b0a
movzx ecx, word [edx + eax*2 + 0x2a]
and ecx, esi
cmp byte [ebx + 0x17], 1
lea edi, [ecx + edx + 0x2c]
je 0x4f5b41
mov edx, dword [esp + 0x38]
push edx
dec eax
push eax
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0xc4]
push edx
call fcn.00457690
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x4f6078
cmp byte [ebx + 0x17], 3
je 0x4f5b73
lea eax, [esp + 0x3c]
push eax
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x79]
push ecx
lea edx, [esp + 0xbc]
push edx
push 0
push eax
push ebx
call fcn.00459250
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x4f6078
mov ecx, dword [esp + 0x20]
movsx edx, word [ecx + 0x28]
dec edx
cmp dword [ebx + 0xf], edx
jge 0x4f5be0
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x34]
lea eax, [esp + 0xb4]
push eax
mov eax, dword [esp + 0x30]
push ecx
push edi
push edx
push eax
lea ecx, [esp + 0x7c]
push ecx
push ebx
call fcn.0045a860
add esp, 0x1c
jmp 0x4f5bd6
cmp byte [esp + 0x13], 0
jne 0x4f5be0
cmp byte [ebx + 0x17], 3
jne 0x4f5be0
cmp dword [ebx + 0xf], 0
jne 0x4f5be0
cmp word [edx + 0x28], 1
jle 0x4f5be0
lea edx, [esp + 0x14]
push edx
lea edi, [esp + 0x44]
mov eax, ebx
call fcn.004f0c90
add esp, 4
mov esi, eax
test esi, esi
jne 0x4f6078
cmp byte [ebx + 0x17], 1
jne 0x4f5bee
xor ecx, ecx
mov dword [esp + 0x76], ecx
jmp 0x4f5c06
mov eax, dword [ebx + 0xf]
mov ecx, dword [esp + 0x20]
push eax
push ecx
push ebx
call fcn.00459620
add esp, 0xc
mov dword [esp + 0x76], eax
mov ecx, eax
cmp byte [ebx + 0x17], 3
mov edi, dword [esp + 0x2c]
jne 0x4f5c14
xor esi, esi
jmp 0x4f5c49
movzx ecx, word [edi]
movsx eax, cx
cdq
sub eax, edx
sar eax, 1
movzx edx, word [edi + eax*2 - 2]
cmp dx, cx
jl 0x4f5c2c
dec eax
jmp 0x4f5c2f
movsx eax, dx
movsx esi, word [edi + eax*2]
mov edx, dword [ebp + 0xed]
mov ecx, dword [esp + 0x76]
add edx, edx
sub esi, edx
sub esi, dword [esp + 0x3c]
inc esi
and esi, 0xfffffffe
mov dword [esp + 0x7a], esi
lea ecx, [ecx]
movsx eax, byte [ebx + 0x17]
cmp eax, 5
ja case.default.0x4f5c5d
jmp dword [eax*4 + 0x4f6264]
cmp ecx, esi
jne 0x4f5c90
cmp byte [ebx + 9], 0
je 0x4f5e45
mov al, byte [esp + 0x34]
cmp al, byte [esp + 0x75]
jne 0x4f5c90
mov dl, byte [esp + 0x9a]
cmp dl, byte [esp + 0x9b]
je 0x4f5e45
mov eax, dword [esp + 0x92]
sub eax, dword [esp + 0x96]
sub eax, esi
add eax, ecx
test eax, eax
setg dl
add dl, 4
mov byte [ebx + 0x17], dl
jmp 0x4f5c50
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x4f5cd1
push 0x7fa0
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
je 0x4f5fb3
mov ecx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x58]
push eax
push ecx
lea edx, [esp + 0x74]
push edx
mov edx, dword [esp + 0x34]
push ebx
mov ecx, edi
call fcn.004f4380
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x4f6078
cmp byte [ebx + 0x17], 0
jne 0x4f5d0b
cmp byte [esp + 0x40], 6
jne 0x4f5f52
mov ecx, dword [ebx + 0x13]
xor edx, edx
cmp ecx, edx
lea eax, [ecx - 1]
mov byte [esp + 0x1b], 1
mov dword [ebx + 0x13], eax
jle 0x4f5d3d
mov ecx, dword [ebp + 0xcb]
imul eax, eax, 0x26
mov ecx, dword [ecx + eax + 0x16]
mov dword [ebx + 4], ecx
mov ecx, dword [ebp + 0xcb]
movsx eax, word [ecx + eax + 0x1e]
mov dword [ebx + 0xf], eax
cmp byte [esp + 0x13], 0
je 0x4f5d90
mov dword [esp + 0x3c], edx
mov dword [esp + 0x96], edx
mov dword [esp + 0x92], edx
mov byte [esp + 0x75], 0
mov byte [esp + 0x9b], 0
mov byte [esp + 0x9a], 0
mov dword [ebp + 0xed], edx
mov byte [esp + 0x34], 0
mov byte [ebx + 9], 0
mov byte [esp + 0x13], 0
mov byte [esp + 0x38], 1
mov byte [ebx + 8], 1
mov byte [esp + 0x1bc], 0
mov al, byte [esp + 0x40]
test al, al
jne 0x4f5ef8
cmp byte [ebx + 0x17], 3
je 0x4f5f29
mov edi, dword [esp + 0x14]
cmp edi, edx
jne 0x4f5dca
push 0x7fa0
call dword [sym.imp.MSVCR90.dll_malloc]
mov edi, eax
add esp, 4
mov dword [esp + 0x14], edi
test edi, edi
je 0x4f5fb3
mov esi, dword [esp + 0x1c]
movzx ecx, word [esi]
movsx eax, cx
cdq
sub eax, edx
sar eax, 1
movzx edx, word [esi + eax*2 - 2]
cmp dx, cx
jl 0x4f5ee4
movsx ecx, word [esi + eax*2 - 2]
dec eax
push ecx
push esi
push edi
call sub.MSVCR90.dll_memcpy
add esp, 0xc
jmp 0x4f5f29
cmp dword [ebx + 0x13], 0
jne case.0x4f5c5d.5
cmp word [ebp + 0x30], 1
jle case.0x4f5c5d.5
mov eax, dword [esp + 0x20]
cmp word [eax + 0x28], 2
je 0x4f5f3e
cmp byte [esp + 0x40], 6
mov eax, dword [esp + 0x24]
setne cl
movzx edx, cl
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x34]
push eax
push ecx
push edx
lea eax, [esp + 0x78]
push eax
mov edi, ebx
call fcn.004f4f30
jmp 0x4f5ced
cmp byte [ebx + 8], 0
mov eax, dword [ebx + 0xf]
mov edx, dword [esp + 0x20]
je 0x4f5e59
mov cx, word [edx + eax*8 + 0x2c]
jmp 0x4f5e5e
mov cx, word [edx + eax*2 + 0x2c]
and cx, word [0x6d3930]
mov dword [esp + 0xb4], 0
movzx ecx, cx
push ecx
mov ecx, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x7d]
push ecx
lea ecx, [ebp + 0x167]
push ecx
push edi
push eax
push edx
mov edx, dword [ebx + 4]
push edx
lea eax, [esp + 0xd4]
mov edx, esi
push eax
mov esi, ebx
call fcn.004f1c70
mov esi, eax
add esp, 0x24
test esi, esi
jne 0x4f6078
cmp dword [ebp + 0x263], eax
je 0x4f5edb
mov ecx, dword [ebx + 4]
push eax
push ecx
lea edx, [ebp + 0x10]
push edx
push ebp
call fcn.004eb3b0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x4f6078
add dword [ebp + 0x263], 0xffffffff
jne 0x4f5fd8
mov byte [ebx + 0x17], 0
jmp 0x4f5d00
movsx eax, dx
movsx ecx, word [esi + eax*2]
push ecx
push esi
push edi
call sub.MSVCR90.dll_memcpy
add esp, 0xc
jmp 0x4f5f29
cmp al, 6
jne 0x4f5f29
mov eax, dword [ebx + 0x13]
mov ecx, eax
imul ecx, ecx, 0x26
mov byte [ebx + 0x17], 2
mov esi, dword [ebp + 0xcb]
mov ecx, dword [ecx + esi + 0x3c]
mov dword [ebx + 0x18], ecx
cmp dword [ebx + 0xf], edx
je 0x4f5f21
mov byte [esp + 0x40], 0
jmp 0x4f5f29
cmp eax, edx
je 0x4f5fd8
cmp byte [ebx + 0x17], 0
mov edx, dword [esp + 0x14]
mov dword [esp + 0x2c], edx
je 0x4f5f52
xor edi, edi
jmp 0x4f59c1
mov esi, ebx
call fcn.004f0f50
mov esi, eax
test esi, esi
jne 0x4f6078
mov byte [ebx + 0x17], al
cmp byte [esp + 0x40], 7
jne 0x4f5f86
mov edx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x70]
push ecx
mov eax, ebx
mov dword [ebp + 0xed], 0
call fcn.004f5750
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4f6078
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x58]
mov dword [ebp + 0xed], edx
mov cl, byte [eax]
and cl, 0x40
mov byte [ebx + 9], cl
mov dl, byte [eax]
and dl, 3
cmp dl, 2
jne 0x4f601e
test byte [eax + 1], 4
jne 0x4f601e
mov eax, 1
jmp 0x4f6020
push str.P:_seibt_transbascheckpnt_tb68_1_checkpoint_bbman_bbwrite.c
push 0
push 0x7fa0
push 0x3fb
push 6
call fcn.00406f10
add esp, 0x14
mov eax, 6
jmp 0x4f6248
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.MSVCR90.dll_free]
test eax, eax
je 0x4f5fec
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4f5ffa
push eax
call esi
add esp, 4
movsx eax, byte [esp + 0x40]
movsx ecx, byte [ebx + 0x17]
mov edx, dword [ebx + 0x13]
push eax
mov eax, dword [ebp + 0x263]
push ecx
mov ecx, dword [ebx + 4]
push edx
push eax
push ecx
push str.ERRLM
jmp 0x4f6231
xor eax, eax
mov byte [ebx + 8], al
cmp dword [0x6b2358], 0
je 0x4f60b0
cmp byte [ebp + 0xcf], 0
je 0x4f6061
mov eax, dword [ebx + 0x13]
test eax, eax
jle 0x4f6050
mov ecx, dword [ebp + 0xcb]
dec eax
imul eax, eax, 0x26
mov eax, dword [eax + ecx + 0x16]
jmp 0x4f6064
mov ecx, dword [ebp + 0xcb]
xor eax, eax
imul eax, eax, 0x26
mov eax, dword [eax + ecx + 0x16]
jmp 0x4f6064
mov eax, dword [ebx + 4]
push eax
lea edx, [ebp + 0x10]
push edx
push ebx
call fcn.0045bd20
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4f60b0
mov eax, dword [esp + 0x1c]
mov edi, dword [sym.imp.MSVCR90.dll_free]
test eax, eax
je 0x4f608c
push eax
call edi
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4f609a
push eax
call edi
add esp, 4
push 0x3fb
push 0
call fcn.00406f10
add esp, 8
mov eax, esi
jmp 0x4f6248
cmp byte [esp + 0x1b], 0
je 0x4f6178
mov eax, dword [ebp + 0x57]
sub eax, 1
mov byte [ebp + 0xcf], 0
mov esi, dword [0x6d3938]
mov dword [esp + 0x24], eax
mov edi, 0
mov dword [esp + 0x30], 0x6d3938
je 0x4f6178
jmp 0x4f60f0
cmp edi, dword [0x6d3964]
je 0x4f61a7
cmp dword [esi + 0x20], 0xffffffff
je 0x4f612d
cmp esi, ebp
je 0x4f612d
mov eax, dword [esp + 0x64]
cmp eax, dword [esi + 4]
jne 0x4f612d
lea ecx, [ebp + 0x10]
push ecx
lea edx, [esi + 0x10]
push edx
call fcn.00576f50
add esp, 8
test eax, eax
jne 0x4f612d
dec dword [esp + 0x24]
mov byte [esi + 0xcf], al
inc edi
mov eax, 0x88888889
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, eax
shl ecx, 4
sub ecx, eax
add ecx, ecx
mov edx, edi
sub edx, ecx
je 0x4f6158
add esi, 0x400
jmp 0x4f616d
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 4]
mov dword [esp + 0x30], eax
test eax, eax
je 0x4f616b
mov esi, dword [eax]
jmp 0x4f616d
xor esi, esi
cmp dword [esp + 0x24], 0
jne 0x4f60f0
cmp dword [esp + 0x1c], 0
mov esi, dword [sym.imp.MSVCR90.dll_free]
je 0x4f618f
mov ecx, dword [esp + 0x1c]
push ecx
call esi
add esp, 4
cmp dword [esp + 0x14], 0
je 0x4f61a0
mov edx, dword [esp + 0x14]
push edx
call esi
add esp, 4
xor eax, eax
jmp 0x4f6248
cmp dword [esp + 0x1c], 0
mov esi, dword [sym.imp.MSVCR90.dll_free]
je 0x4f61be
mov ecx, dword [esp + 0x1c]
push ecx
call esi
add esp, 4
cmp dword [esp + 0x14], 0
je 0x4f61cf
mov edx, dword [esp + 0x14]
push edx
call esi
add esp, 4
movsx eax, byte [ebp + 0x211]
movsx ecx, word [ebp + 0x213]
mov edx, dword [ebx + 0xf]
push edi
push eax
movsx eax, byte [ebx + 9]
push ecx
push edx
push eax
push str.ERRLMT
jmp 0x4f6231
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.MSVCR90.dll_free]
test eax, eax
je 0x4f6204
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4f6212
push eax
call esi
add esp, 4
movsx eax, byte [esp + 0x40]
movsx ecx, byte [ebx + 0x17]
mov edx, dword [ebx + 0x13]
push eax
mov eax, dword [ebp + 0x263]
push ecx
mov ecx, dword [ebx + 4]
push edx
push eax
push ecx
push str.ERRLM9999
push 0x3fb
push 0x145
call fcn.00406f10
add esp, 0x20
mov eax, 0x145
mov ecx, dword [esp + 0x1a8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00586584
add esp, 0x19c
ret