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

Disassembly:
sub esp, 0x4a4
push ebx
push esi
push edi
xor esi, esi
mov edi, dword [esp + 0x4b4]
push ebp
mov eax, dword [esp + 0x4bc]
push edi
lea ecx, [esp + 0x3b4]
push eax
mov dword [esp + 0x18], esi
push 0x5430c4
mov dword [esp + 0x28], esi
push ecx
call fcn.00519a30
lea ecx, [esp + 0x3c0]
add esp, 0x10
push 0x543070
push ecx
call fcn.00519a10
mov dword [esp + 0x1c], eax
add esp, 8
test eax, eax
jne 0x497e07
push edi
mov eax, dword [0x547328]
push str.Error:_could_not_find_resource_build_file:__s
push eax
call fcn.0042ed50
add esp, 0xc
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
lea eax, [esp + 0x7c]
lea ecx, [esp + 0xa4]
mov edx, dword [esp + 0x14]
push eax
push ecx
push 0x54a454
push edx
call fcn.005199c0
lea ecx, [esp + 0xb4]
mov edx, dword [esp + 0x4d0]
lea eax, [esp + 0x2bc]
add esp, 0x10
push ecx
push edx
push 0x5430c4
push eax
call fcn.00519a30
lea ecx, [esp + 0xb4]
mov edx, dword [esp + 0x24]
add esp, 0x10
push ecx
push 0x5432e8
push edx
call fcn.005199c0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4980b1
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x14]
push eax
push 0x54330c
push ecx
call fcn.005199c0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4980b1
lea eax, [esp + 0xa4]
mov ecx, dword [esp + 0x4bc]
lea edx, [esp + 0x1a8]
push eax
push ecx
push 0x5430c4
push edx
call fcn.00519a30
lea ecx, [esp + 0xb4]
add esp, 0x10
push ecx
call fcn.00498510
add esp, 4
mov edi, eax
test edi, edi
je 0x49810c
xor esi, esi
xor ebx, ebx
mov ecx, dword [esp + 0x10]
cmp ecx, ebx
je 0x497eee
mov eax, dword [ecx]
cmp edi, eax
je 0x497eec
jbe 0x497ee3
mov esi, ecx
mov ecx, dword [ecx + 0x10]
test ecx, ecx
jne 0x497ed9
jmp 0x497eee
mov ebx, ecx
test ebx, ebx
jne 0x497f42
push 0x14
call fcn.00513eb0
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x498135
mov dword [ebx], edi
test esi, esi
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
jne 0x497f35
mov eax, dword [esp + 0x10]
mov dword [ebx + 0x10], eax
mov dword [esp + 0x10], ebx
jmp 0x497f3e
mov eax, dword [esi + 0x10]
mov dword [ebx + 0x10], eax
mov dword [esi + 0x10], ebx
inc dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x497f6c
mov eax, dword [ecx]
mov edx, dword [esp + 0x20]
cmp edx, eax
je 0x498155
jbe 0x497f65
mov dword [esp + 0x18], ecx
mov ecx, dword [ecx + 0x10]
test ecx, ecx
jne 0x497f51
push 0x118
call fcn.00513eb0
add esp, 4
mov ebp, eax
test ebp, ebp
je 0x498182
mov eax, dword [esp + 0x20]
lea edi, [esp + 0x1a8]
mov ecx, 0xffffffff
mov dword [ebp], eax
mov dword [ebp + 4], 0
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
mov dword [ebp + 0x10], 0
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
lea edi, [ebp + 0x14]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x8000
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1ac]
push eax
call fcn.00519e70
add esp, 8
mov esi, eax
cmp esi, 0xffffffff
jne 0x49800d
lea eax, [esp + 0x1a8]
mov ecx, dword [0x547328]
push eax
push str.Error:_unable_to_open_file:__s
push ecx
call fcn.0042ed50
add esp, 0xc
push ebp
call fcn.00513ed0
jmp 0x49808b
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x498020
mov eax, dword [ebx + 0xc]
mov dword [ebp + 0x10], eax
mov dword [ebx + 0xc], ebp
jmp 0x49802d
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x10]
mov dword [ebp + 0x10], ecx
mov dword [eax + 0x10], ebp
mov eax, dword [ebx + 8]
push 2
inc eax
push 0
push esi
mov dword [ebx + 8], eax
call fcn.00519d90
add esp, 0xc
mov edi, eax
push 0
push 0
push esi
call fcn.00519d90
add esp, 0xc
test edi, edi
jle 0x4981a2
push edi
call fcn.00513ee0
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
je 0x4981cb
push edi
mov dword [ebp + 0xc], edi
mov eax, dword [ebp + 8]
push eax
push esi
call fcn.00519b20
add esp, 0xc
cmp eax, edi
jne 0x4981eb
push esi
call fcn.0051b430
lea eax, [esp + 0xa8]
mov ecx, dword [esp + 0x18]
add esp, 4
push eax
push 0x5432e8
push ecx
call fcn.005199c0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x497e6e
mov eax, dword [esp + 0x14]
push eax
call fcn.00519950
lea eax, [esp + 0x2b0]
add esp, 4
push 0x180
push 0x8301
push eax
call fcn.00519e70
add esp, 0xc
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x498214
lea eax, [esp + 0x2ac]
mov ecx, dword [0x547328]
push eax
push str.Error:_unable_to_create_resource_file_file:__s
push ecx
call fcn.0042ed50
add esp, 0xc
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
lea eax, [esp + 0xa4]
mov ecx, dword [0x547328]
push eax
push str.Error:_could_not_determine_file_type_of:__s
push ecx
call fcn.0042ed50
add esp, 0xc
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
push str.Error:_out_of_memory_1
mov eax, dword [0x547328]
push eax
call fcn.0042ed50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
lea eax, [esp + 0x1a8]
add ecx, 0x14
push eax
mov edx, dword [0x547328]
push ecx
push str.Error:_duplicate_resources:__s___s
push edx
call fcn.0042ed50
add esp, 0x10
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
push str.Error:_out_of_memory_2
mov eax, dword [0x547328]
push eax
call fcn.0042ed50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
lea eax, [esp + 0x1a8]
mov ecx, dword [0x547328]
push eax
push str.Error:_file_is_empty_NULL:__s
push ecx
call fcn.0042ed50
add esp, 0xc
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
push str.Error:_out_of_memory_3
mov eax, dword [0x547328]
push eax
call fcn.0042ed50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
lea eax, [esp + 0x1a8]
mov ecx, dword [0x547328]
push eax
push str.Error:_error_reading_file:__s
push ecx
call fcn.0042ed50
add esp, 0xc
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
mov eax, dword [esp + 0x1c]
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0x10]
mov ebp, eax
test ebp, ebp
lea edx, [ecx*4 + 0x40]
je 0x49823f
mov dword [eax + 4], edx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0x10]
test eax, eax
lea ebp, [ecx + ecx*2]
lea edx, [edx + ebp*4]
jne 0x49822c
mov esi, edx
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x498266
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x49825f
mov dword [eax + 4], esi
mov ebp, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
add esi, ebp
test eax, eax
jne 0x498250
mov ecx, dword [ecx + 0x10]
test ecx, ecx
jne 0x498249
lea edi, [esp + 0x3c]
xor eax, eax
mov ecx, 0x10
rep stosd dword es:[edi], eax
mov edi, str.Copyright__c__1997_Ensemble_Studios.
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x3c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.1.00
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x64]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x7c]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x68]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x40
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x7c], edx
mov dword [esp + 0x78], ecx
lea eax, [esp + 0x40]
push eax
push ebx
call fcn.0051b500
add esp, 0xc
cmp eax, 0x40
je 0x498325
push str.Error_writing_resource_file_header
mov eax, dword [0x547328]
push eax
call fcn.0042ed50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
mov edi, 0x40
mov esi, dword [esp + 0x10]
test esi, esi
je 0x498369
mov eax, dword [esi]
push 0xc
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
mov ecx, dword [esi + 4]
push eax
mov dword [esp + 0x30], ecx
push ebx
mov edx, dword [esi + 8]
mov dword [esp + 0x38], edx
call fcn.0051b500
add esp, 0xc
cmp eax, 0xc
jne 0x498467
add edi, 0xc
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x498332
mov ebp, dword [esp + 0x10]
test ebp, ebp
je 0x49840b
mov eax, dword [ebp + 4]
cmp eax, edi
jne 0x498487
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x4983be
mov eax, dword [esi]
push 0xc
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
mov ecx, dword [esi + 4]
push eax
mov dword [esp + 0x3c], ecx
push ebx
mov edx, dword [esi + 0xc]
mov dword [esp + 0x44], edx
call fcn.0051b500
add esp, 0xc
cmp eax, 0xc
jne 0x4984a7
add edi, 0xc
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x498387
mov ebp, dword [ebp + 0x10]
test ebp, ebp
jne 0x498375
mov ebp, dword [esp + 0x10]
test ebp, ebp
je 0x49840b
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x498404
mov eax, dword [esi + 4]
cmp eax, edi
jne 0x4984c7
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
push eax
push ecx
push ebx
call fcn.0051b500
add esp, 0xc
mov ecx, dword [esi + 0xc]
cmp eax, ecx
jne 0x4984e7
add edi, ecx
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x4983d4
mov ebp, dword [ebp + 0x10]
test ebp, ebp
jne 0x4983cd
push ebx
call fcn.0051b430
mov edi, dword [esp + 0x14]
add esp, 4
test edi, edi
je 0x498457
mov ebx, dword [edi + 0xc]
test ebx, ebx
je 0x498445
mov eax, dword [ebx + 8]
test eax, eax
je 0x498433
push eax
call fcn.00514010
add esp, 4
mov esi, dword [ebx + 0x10]
push ebx
mov ebx, esi
call fcn.00513ed0
add esp, 4
test esi, esi
jne 0x498423
mov esi, dword [edi + 0x10]
push edi
mov edi, esi
call fcn.00513ed0
add esp, 4
test esi, esi
jne 0x49841c
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
push str.Error_writing_resource_file_header:_type_node
mov eax, dword [0x547328]
push eax
call fcn.0042ed50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
push str.Error_writing_resource_file:_pos_out_of_sync_1
mov eax, dword [0x547328]
push eax
call fcn.0042ed50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
push str.Error_writing_resource_file_header:_id_node
mov eax, dword [0x547328]
push eax
call fcn.0042ed50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
push str.Error_writing_resource_file_data:_pos_out_of_sync_2
mov eax, dword [0x547328]
push eax
call fcn.0042ed50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret
push str.Error_writing_resource_file_data
mov eax, dword [0x547328]
push eax
call fcn.0042ed50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4a4
ret