Function at 0x4c9a60
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5399fe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x13c
mov eax, dword [esp + 0x14c]
push ebx
push ebp
push esi
mov esi, eax
push edi
shl esi, 4
add esi, eax
mov dword [0x6b2ef0], 0
shl esi, 2
mov dword [esp + 0x30], esi
mov ebx, dword [esi + 0x6b2458]
mov dword [esp + 0x28], ebx
mov edi, dword [ebx + 8]
test edi, edi
jle 0x4c9b87
mov eax, edi
shl eax, 6
add eax, 4
push eax
call fcn.00529ba2
add esp, 4
mov dword [esp + 0x3c], eax
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x154], ecx
je 0x4c9aef
push fcn.0045fdb0
push fcn.0045fd60
lea ebp, [eax + 4]
push edi
push 0x40
push ebp
mov dword [eax], edi
call fcn.00529ca3
mov ecx, ebp
mov eax, dword [esi + 0x6b2458]
mov dword [esp + 0x154], 0xffffffff
add eax, 0xc
mov dword [esi + 0x6b2450], ecx
test edi, edi
jle 0x4c9b87
add ecx, 0x10
mov dword [esp + 0x10], edi
mov dx, word [eax]
add eax, 0x24
mov word [ecx - 0xc], dx
mov dx, word [eax - 0x22]
mov word [ecx - 0xa], dx
mov edx, dword [eax - 0x18]
mov ebx, dword [eax - 0x1c]
mov ebp, dword [eax - 0x20]
mov dword [ecx - 8], ebp
mov dword [ecx - 4], ebx
mov dword [ecx], edx
mov dx, word [eax - 0x10]
mov bx, word [eax - 0x12]
mov bp, word [eax - 0x14]
mov word [ecx + 4], bp
mov word [ecx + 6], bx
mov word [ecx + 8], dx
mov dx, word [eax - 0xe]
mov word [ecx + 0xa], dx
mov dl, byte [eax - 0xc]
mov byte [ecx + 0xc], dl
mov dl, byte [eax - 0xb]
mov byte [ecx + 0xd], dl
mov dl, byte [eax - 0xa]
mov byte [ecx + 0xe], dl
mov dl, byte [eax - 9]
mov byte [ecx + 0xf], dl
mov edx, dword [eax - 4]
mov dword [ecx + 0x14], edx
mov edx, dword [esp + 0x10]
add ecx, 0x40
dec edx
mov dword [esp + 0x10], edx
jne 0x4c9b14
mov ebx, dword [esp + 0x28]
lea eax, [edi + edi*8]
mov edx, dword [ebx + eax*4 + 0xc]
lea ebp, [ebx + eax*4 + 0x10]
test edx, edx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], edx
jbe 0x4c9baf
mov eax, ebp
mov ecx, edx
mov edi, dword [eax]
add eax, 4
add edi, ebx
dec ecx
mov dword [eax - 4], edi
jne 0x4c9ba2
mov dword [esi + 0x6b2454], ebp
mov eax, dword [ebx + 4]
add eax, ebx
cmp dword [eax], 0xffffffff
je 0x4c9bce
mov ecx, dword [eax + 4]
add eax, 4
lea eax, [eax + ecx + 4]
cmp dword [eax], 0xffffffff
jne 0x4c9bbf
add eax, 4
mov dword [esi + 0x6b244c], eax
lea edi, [eax + edx*4 + 4]
mov dword [esp + 0x40], edi
mov eax, dword [edi - 4]
mov byte [0x6b2f08], 1
test eax, eax
mov dword [esp + 0x18], eax
jbe 0x4c9cf3
mov dword [esp + 0x10], eax
mov ecx, dword [edi]
xor ebp, ebp
mov eax, ecx
and eax, 0x1ff
mov eax, dword [eax*4 + 0x6ab934]
cmp eax, ebp
je 0x4c9c25
cmp dword [eax + 0x14], ecx
je 0x4c9c1d
mov eax, dword [eax + 0x20]
cmp eax, ebp
jne 0x4c9c0f
jmp 0x4c9c25
cmp eax, ebp
jne 0x4c9cd7
mov bl, byte [0x6b2f08]
test bl, bl
jne 0x4c9c4b
push ecx
push str.Cant_find_texture_from_checksum__ld
push ebp
call fcn.004015b0
mov ecx, dword [0x56ea98]
mov edx, dword [esp + 0x20]
add esp, 0xc
mov eax, dword [ecx + 4]
cmp eax, ebp
jne 0x4c9cd7
mov edx, dword [0x6b2ee0]
mov esi, dword [edi]
cmp edx, ebp
push str.Run_out_of_texture_entries__increase_MAXTEXTUREENTRIES_in_spool.cpp
setne dl
push edx
call fcn.004015b0
mov eax, dword [0x6b2ee0]
add esp, 8
mov ecx, dword [eax + 0x20]
lea edx, [eax + 0x20]
mov dword [0x6b2ee0], ecx
mov ecx, esi
and ecx, 0x1ff
mov ebx, dword [ecx*4 + 0x6ab934]
mov dword [eax + 0x24], ebp
mov dword [edx], ebx
mov dword [ecx*4 + 0x6ab934], eax
mov edx, dword [edx]
cmp edx, ebp
je 0x4c9ca3
mov dword [edx + 0x24], eax
mov cl, byte [eax + 0x12]
mov edx, dword [esp + 0x15c]
and cl, 0xf0
mov dword [eax + 0x28], edx
mov edx, dword [esp + 0x14]
mov dword [eax + 0x14], esi
mov byte [eax + 0x12], cl
mov word [eax + 0x10], bp
mov word [eax + 2], bp
mov byte [eax], 0
mov byte [eax + 1], 0
mov byte [eax + 4], 0
mov byte [eax + 5], 0
mov dword [eax + 0x1c], ebp
inc word [eax + 0x10]
mov dword [edi], eax
mov eax, dword [esp + 0x10]
add edi, 4
dec eax
mov dword [esp + 0x10], eax
jne 0x4c9bf9
mov ebp, dword [esp + 0x2c]
test edx, edx
mov byte [0x6b2f08], 0
jbe 0x4c9d67
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x10], edx
mov esi, dword [ebp]
xor ecx, ecx
xor edx, edx
xor eax, eax
mov cx, word [esi + 4]
mov dx, word [esi + 2]
mov ax, word [esi + 6]
add ecx, edx
test eax, eax
lea esi, [esi + ecx*8 + 0x1c]
jbe 0x4c9d59
mov edi, eax
test byte [esi], 1
je 0x4c9d35
mov eax, dword [esi + 0x10]
mov ecx, dword [ebx + eax*4]
mov dword [esi + 0x10], ecx
mov ecx, dword [esi]
push str.Zero_face_length
test ecx, 0xfffc0000
setne dl
push edx
call fcn.004015b0
mov eax, dword [esi]
add esp, 8
shr eax, 0x12
dec edi
lea esi, [esi + eax*4]
jne 0x4c9d27
mov eax, dword [esp + 0x10]
add ebp, 4
dec eax
mov dword [esp + 0x10], eax
jne 0x4c9d06
call fcn.004c9680
call fcn.004617d0
mov ebp, dword [esp + 0x28]
mov eax, dword [ebp + 4]
add eax, ebp
cmp dword [eax], 0xffffffff
je 0x4c9d8e
mov ecx, dword [eax + 4]
add eax, 4
lea eax, [eax + ecx + 4]
cmp dword [eax], 0xffffffff
jne 0x4c9d7f
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
add ecx, edx
lea esi, [eax + ecx*4 + 8]
mov eax, dword [eax + ecx*4 + 8]
add esi, 4
test eax, eax
jbe 0x4c9dd2
lea edi, [esi + 4]
mov ebx, eax
mov edx, dword [esi]
push edx
call fcn.004617b0
add esp, 4
test eax, eax
jne 0x4c9dc9
mov eax, dword [esi]
push 1
push edi
push eax
call fcn.00461980
add esp, 0xc
add esi, 0x24
add edi, 0x24
dec ebx
jne 0x4c9dac
mov eax, dword [esi]
add esi, 4
test eax, eax
jbe 0x4c9e0c
lea edi, [esi + 4]
mov ebx, eax
mov ecx, dword [esi]
push ecx
call fcn.004617b0
add esp, 4
test eax, eax
jne 0x4c9dfd
mov edx, dword [esi]
push 2
push edi
push edx
call fcn.00461980
add esp, 0xc
add esi, 0x204
add edi, 0x204
dec ebx
jne 0x4c9de0
mov dword [0x60dbc0], 0
mov eax, dword [ebp + 4]
add eax, ebp
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4c9e44
mov edx, dword [eax + 4]
add eax, 4
add eax, 4
cmp ecx, 0x45
jne 0x4c9e3a
mov dword [0x60dbc0], 1
mov ecx, dword [eax + edx]
add eax, edx
cmp ecx, 0xffffffff
jne 0x4c9e22
mov ebp, dword [esp + 0x30]
lea eax, [ebp + 0x6b2440]
push eax
call fcn.004c9850
mov eax, dword [esi]
add esp, 4
add esi, 4
test eax, eax
mov dword [esp + 0x38], esi
jbe 0x4ca379
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov edi, dword [eax]
add eax, 4
add edi, edx
mov dword [esp + 0x38], eax
mov eax, dword [edi + 8]
mov ebx, dword [edi]
mov ebp, dword [edi + 4]
mov esi, dword [edi + 0xc]
mov dword [esp + 0x10], eax
mov al, byte [ecx + 0x6b247b]
test al, al
je 0x4c9e9f
or bh, 8
cmp ebp, 0x10
je 0x4c9eb8
cmp ebp, 0x100
je 0x4c9eb8
cmp ebp, 0x10000
je 0x4c9eb8
xor eax, eax
jmp 0x4c9ebd
mov eax, 1
push str.Bad_value_for_NumColours_in_PSX_file
push eax
call fcn.004015b0
mov edx, dword [esp + 0x48]
add esp, 8
mov esi, dword [edx + esi*4]
test esi, esi
je 0x4ca366
test byte [esi + 0x12], 0xf
jne 0x4ca366
mov eax, dword [esi + 0x14]
cmp eax, 0xb159e2ab
jne 0x4c9ef1
or ebx, 1
cmp eax, 0x68b7b136
jne 0x4c9efb
or ebx, 1
mov cx, word [edi + 0x10]
add edi, 0x10
add edi, 2
mov dword [esp + 0x24], ecx
mov dx, word [edi]
add edi, 2
mov dword [esp + 0x20], edi
mov edi, dword [0x6b78f8]
test edi, edi
mov dword [esp + 0x1c], edx
jne 0x4c9f9b
cmp eax, 0x3ed5f30b
ja 0x4c9f5a
je 0x4c9f88
cmp eax, 0x1a501534
ja 0x4c9f4a
je 0x4c9f88
cmp eax, 0x8bd6474
je 0x4c9f88
cmp eax, 0x1527743e
je 0x4c9f88
cmp eax, 0x197bc27a
je 0x4c9f88
jmp 0x4c9f9b
cmp eax, 0x21afe1a6
je 0x4c9f88
cmp eax, 0x3bc194ae
je 0x4c9f88
jmp 0x4c9f9b
cmp eax, 0x933ef22c
ja 0x4c9f7a
je 0x4c9f88
cmp eax, 0x42985f7a
je 0x4c9f88
cmp eax, 0x4e1e5e1a
je 0x4c9f88
cmp eax, 0x7ffb7aad
je 0x4c9f88
jmp 0x4c9f9b
cmp eax, 0xceb60740
je 0x4c9f88
cmp eax, 0xe9587c6d
jne 0x4c9f9b
push edx
push ecx
push esi
call fcn.004b8c80
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
add esp, 0xc
cmp cx, 0x100
ja 0x4c9fad
cmp dx, 0x100
jbe 0x4ca068
mov eax, dword [esi + 0x14]
mov edi, 0x556c6c
cmp dword [edi], eax
je 0x4c9fc9
add edi, 4
cmp edi, str.Too_many_items_have_the_same_checksum_mod_256_n_Need_to_increase_MAXITEMSPERCHECKSUM_in_spool.cpp
jl 0x4c9fb5
jmp 0x4ca068
push eax
lea eax, [esp + 0x50]
push str.lti_tex__8.8x.bmp
push eax
call fcn.00529f90
lea ecx, [esp + 0x58]
push ecx
push str.____Loading_Replacement_Texture:__s_r_n
call fcn.004015b0
mov edx, dword [esi + 0x14]
push 1
push 0xffffffffffffffff
lea eax, [esp + 0x68]
push edx
push eax
call fcn.00510940
lea ecx, [esp + 0x68]
mov word [esi + 2], ax
lea edx, [esp + 0x6c]
push ecx
and eax, 0xffff
push edx
push eax
mov ebp, 0xffffff
and ebx, 0x7fffffff
call fcn.0050f0e0
mov ecx, dword [esi + 0x14]
mov edi, dword [esp + 0x74]
mov eax, dword [esp + 0x78]
mov dl, bl
and dl, 1
push ecx
shl dl, 1
push edx
lea ecx, [esp + 0x50]
mov dword [esp + 0x54], edi
push 0x10
lea edx, [esp + 0x50]
mov dword [esp + 0x60], eax
push ecx
and edi, 0xffff
push edx
and eax, 0xffff
push edi
push eax
push 0
call fcn.004f1410
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x6c]
add esp, 0x50
mov dword [esi + 0x1c], eax
test ebx, 0x80000000
je 0x4ca0b6
mov eax, dword [esi + 0x14]
and bl, 1
shl bl, 1
push eax
push ebx
lea eax, [esp + 0x20]
push 0x10
push eax
lea eax, [esp + 0x24]
and edx, 0xffff
push eax
and ecx, 0xffff
push edx
push ecx
push 0
call fcn.004f1410
mov ecx, dword [esp + 0x40]
push 0
push ecx
mov dword [esi + 0x1c], eax
call fcn.0050ece0
add esp, 0x28
mov word [esi + 2], ax
jmp 0x4ca366
cmp ebp, 0x10000
jne 0x4ca144
mov eax, dword [esp + 0x20]
mov ebp, ecx
lea ecx, [esp + 0x18]
and ebp, 0xffff
mov edi, dword [eax]
add eax, 8
mov dword [esp + 0x20], eax
mov al, bl
mov dword [esp + 0x34], edi
mov edi, edx
mov edx, dword [esi + 0x14]
and al, 1
shl al, 1
push edx
push eax
push 0x10
lea edx, [esp + 0x20]
and edi, 0xffff
push ecx
push edx
push edi
push ebp
push 0
call fcn.004f1410
mov ecx, dword [esp + 0x54]
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x14]
push eax
mov eax, dword [esp + 0x44]
push str.PSXPVR
push ebx
push eax
push ecx
push edi
push ebp
call fcn.0050f3e0
mov edx, dword [esi + 0x14]
mov edi, eax
cmp edi, 0xffffffff
push edx
setne al
push str.Texture_cannot_be_smallvq.__checksum:__lx
push eax
call fcn.004015b0
add esp, 0x48
mov word [esi + 2], di
jmp 0x4ca295
cmp ebp, 0x100
jne 0x4ca1f5
mov ebp, edx
mov dl, bl
mov edi, ecx
mov ecx, dword [esi + 0x14]
and dl, 1
and edi, 0xffff
shl dl, 1
push ecx
push edx
lea eax, [esp + 0x20]
inc edi
push 8
lea ecx, [esp + 0x20]
and ebp, 0xffff
push eax
and edi, 0xfffffffe
push ecx
push ebp
push edi
push 0
call fcn.004f1410
mov dword [esi + 0x1c], eax
mov al, byte [0x54d341]
add esp, 0x20
test al, al
jne 0x4ca1a1
push str.stubbed_out:_LoadImage
call fcn.0046cb90
add esp, 4
test bh, 8
mov dword [esp + 0x34], 1
je 0x4ca1b6
mov dword [esp + 0x34], 0x11
mov eax, dword [esp + 0x15c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x14]
push eax
push ecx
mov dword [esp + 0x44], edx
call fcn.004c97b0
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x2c]
push 0
push str.PSX256BMP
push ecx
push eax
push edx
push ebp
push edi
call fcn.0050e1a0
add esp, 0x28
jmp 0x4ca291
cmp ebp, 0x10
jne 0x4ca295
mov eax, dword [esi + 0x14]
mov edi, ecx
mov cl, bl
and edi, 0xffff
and cl, 1
mov ebp, edx
shl cl, 1
push eax
push ecx
lea edx, [esp + 0x20]
add edi, 3
push 4
lea eax, [esp + 0x20]
and ebp, 0xffff
push edx
and edi, 0xfffffffc
push eax
push ebp
push edi
push 0
call fcn.004f1410
mov dword [esi + 0x1c], eax
mov al, byte [0x54d341]
add esp, 0x20
test al, al
jne 0x4ca251
push str.stubbed_out:_LoadImage
call fcn.0046cb90
add esp, 4
test bh, 8
mov eax, 1
je 0x4ca260
mov eax, 0x11
mov ecx, dword [esi + 0x14]
mov edx, dword [esp + 0x15c]
push eax
mov eax, dword [esp + 0x14]
push ecx
push 0
push str.PSX16BMP
push edx
push eax
call fcn.004c97b0
mov ecx, dword [esp + 0x38]
add esp, 8
push eax
push ecx
push ebp
push edi
call fcn.0050e880
add esp, 0x20
mov word [esi + 2], ax
mov edx, dword [esp + 0x10]
push edx
call fcn.004617b0
add esp, 4
test eax, eax
je 0x4ca2aa
inc word [eax + 4]
mov edx, dword [esp + 0x24]
mov dword [esi + 0x18], eax
mov al, dl
mov cl, byte [esp + 0x1c]
dec al
and bl, 1
mov byte [esi + 4], al
mov byte [esi + 0xa], al
mov eax, dword [esp + 0x1c]
dec cl
neg eax
neg edx
and eax, 0xf8
mov word [esi + 6], 0
sar edx, 3
or eax, 0xf8800000
and edx, 0x1f
shl eax, 2
shl bl, 4
or edx, eax
or bl, 1
mov byte [esi], 0
mov byte [esi + 1], 0
mov byte [esi + 5], 0
mov byte [esi + 8], 0
mov byte [esi + 9], cl
mov byte [esi + 0xb], cl
mov dword [esi + 0xc], edx
mov byte [esi + 0x12], bl
mov eax, dword [0x6b78f8]
test eax, eax
je 0x4ca366
mov ecx, dword [esp + 0x30]
push str.spArmour
lea edi, [ecx + 0x6b2440]
push edi
call fcn.005352f0
add esp, 8
test eax, eax
je 0x4ca353
push 0x54b0e4
push edi
call fcn.005352f0
add esp, 8
test eax, eax
je 0x4ca353
push 6
push str.sp_tex
push edi
call fcn.005353c0
add esp, 0xc
test eax, eax
jne 0x4ca366
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
push edx
push eax
push esi
call fcn.004b8c80
add esp, 0xc
mov eax, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x2c], eax
jne 0x4c9e6c
mov ebp, dword [esp + 0x30]
xor eax, eax
mov byte [ebp + 0x6b2449], al
mov dword [ebp + 0x6b246c], eax
mov dword [0x60dbc0], eax
mov dword [ebp + 0x6b2470], eax
mov eax, dword [esp + 0x28]
mov esi, dword [eax + 4]
add esi, eax
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4ca4be
mov ebx, dword [esi + 4]
add esi, 4
add esi, 4
cmp eax, 0x2c
jg 0x4ca42d
je case.0x4ca3ca.9
add eax, 0xfffffffa
cmp eax, 0x24
ja case.0x4ca3ca.10
xor ecx, ecx
mov cl, byte [eax + 0x4ca50c]
jmp dword [ecx*4 + 0x4ca4f8]
mov eax, dword [esp + 0x15c]
mov ecx, dword [0x556c64]
sub eax, ecx
push esi
neg eax
sbb eax, eax
push eax
call fcn.00455060
add esp, 8
jmp case.0x4ca3ca.10
push esi
mov dword [ebp + 0x6b246c], esi
call fcn.004539a0
lea edx, [esi - 8]
add esp, 4
mov dword [0x6b2ef0], edx
jmp case.0x4ca3ca.10
mov dword [ebp + 0x6b2470], esi
jmp case.0x4ca3ca.10
mov dword [ebp + 0x6b245c], esi
mov byte [ebp + 0x6b2449], 1
jmp case.0x4ca3ca.10
cmp eax, 0x6b6e6843
jg 0x4ca462
je 0x4ca45a
cmp eax, 0x45
je 0x4ca44a
cmp eax, 0x52454948
jne case.0x4ca3ca.10
mov dword [ebp + 0x6b2460], esi
jmp case.0x4ca3ca.10
mov eax, dword [esp + 0x28]
push esi
push eax
call fcn.004caa10
add esp, 8
jmp case.0x4ca3ca.10
mov dword [ebp + 0x6b2474], esi
jmp case.0x4ca3ca.10
cmp eax, 0x73424752
jne case.0x4ca3ca.10
mov edi, ebx
xor ecx, ecx
sar edi, 2
test edi, edi
mov dword [ebp + 0x6b2468], esi
jle case.0x4ca3ca.10
mov edx, dword [ebp + 0x6b2468]
lea eax, [edx + ecx*4]
xor edx, edx
mov dl, byte [eax]
inc eax
mov dl, byte [edx + 0x5f6910]
mov byte [eax - 1], dl
xor edx, edx
mov dl, byte [eax]
inc eax
mov dl, byte [edx + 0x5f6910]
mov byte [eax - 1], dl
xor edx, edx
mov dl, byte [eax]
inc ecx
cmp ecx, edi
mov dl, byte [edx + 0x5f6910]
mov byte [eax], dl
jl 0x4ca47a
mov eax, dword [esi + ebx]
add esi, ebx
cmp eax, 0xffffffff
jne 0x4ca3a6
call fcn.00501120
mov eax, dword [esp + 0x15c]
push eax
call fcn.004534a0
add esp, 4
call fcn.005013a0
mov ecx, dword [esp + 0x14c]
pop edi
mov byte [ebp + 0x6b244a], 1
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x148
ret