Function at 0x475290
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x4c
mov eax, dword [eax]
mov word [esp + 0x36], dx
mov edx, dword [eax + 0x14]
mov dword [esp + 0x38], eax
test edx, edx
je 0x475450
lea ebx, [esp + 0x36]
mov edi, ecx
mov dword [esp + 4], ebx
mov eax, dword [eax + 4]
mov dword [esp], eax
call fcn.0041c6c0
test eax, eax
je 0x475352
mov ebx, dword [eax]
mov edx, dword [esp + 0x38]
test ebx, ebx
jne 0x4752f5
jmp 0x475560
sub eax, 1
cmp eax, edi
je 0x4755a5
test ebp, ebp
je 0x4755e5
mov ebx, ebp
lea ebp, [edx + ebx*8]
lea ecx, [ebx - 1]
mov eax, dword [ebp + 0x10]
mov ebp, dword [ebp + 0x14]
test eax, eax
jne 0x4752e0
movzx esi, word [esp + 0x36]
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
call ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], str.fat_dir_cache_insert_internal
mov dword [esp + 0x10], 0x326
mov dword [esp + 0xc], str.dir.c
mov dword [esp + 8], 0x549666
mov dword [esp + 4], str.__s___s:_d___s__Encountered_free_entry_while_iterating_over_chain_for_key__X.
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x47548f
mov edx, dword [esp + 0x38]
xor ebx, ebx
mov eax, dword [edx + 0x10]
mov ecx, dword [edx + 0x14]
cmp eax, ecx
jne 0x475500
lea eax, [ecx + 0x20000]
cmp ecx, 0x20001
lea ebp, [ecx + ecx]
mov dword [esp + 4], edx
cmovae ebp, eax
lea eax, [esp + 0x38]
mov dword [esp], 0
mov dword [esp + 0x10], eax
lea eax, [ebp*8 + 0x18]
mov dword [esp + 0xc], eax
lea eax, [ecx*8 + 0x18]
mov dword [esp + 8], eax
call fcn.00427410
mov ecx, eax
mov eax, edx
or eax, ecx
jne 0x475610
mov edx, dword [esp + 0x38]
mov eax, ebp
mov ecx, dword [edx + 0x14]
mov dword [esi], edx
lea esi, [edi + 1]
mov dword [esp + 4], 0
sub eax, ecx
lea edx, [edx + ecx*8 + 0x18]
shl eax, 3
mov dword [esp], edx
mov dword [esp + 8], eax
call sub.msvcrt.dll_memset
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0x10]
mov dword [edx + 0x14], ebp
lea ecx, [edx + eax*8]
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x1c], 0
test ebx, ebx
je 0x475510
lea ecx, [ebx - 1]
lea ebx, [eax + 1]
mov dword [edx + ecx*8 + 0x1c], ebx
mov ecx, ebx
cmp ebx, ebp
jae 0x47542f
mov eax, dword [edx + eax*8 + 0x20]
test eax, eax
jne 0x475428
jmp 0x47542f
mov esi, dword [edx + ecx*8 + 0x18]
test esi, esi
je 0x47542f
add ecx, 1
cmp ecx, ebp
jb 0x475420
mov dword [edx + 0x10], ecx
add edi, dword [esp + 0x60]
cmp dword [edx + 8], edi
jae 0x475550
mov dword [edx + 8], edi
xor ecx, ecx
add esp, 0x4c
xor edx, edx
pop ebx
mov eax, ecx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
call ebx
mov dword [esp + 0x14], str.fat_dir_cache_insert_internal
mov dword [esp + 0x10], 0x306
mov dword [esp + 0xc], str.dir.c
mov dword [esp + 8], 0x549666
mov dword [esp + 4], str.__s___s:_d___s__Attempted_to_insert_entry_into_no_name_cache.
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x5496ca
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov ecx, 6
xor edx, edx
mov eax, dword [esp + 0x38]
mov ebx, dword [eax + 0x10]
cmp ebx, dword [eax + 0x14]
jae 0x4754f4
lea eax, [eax + ebx*8]
mov ebx, dword [eax + 0x18]
test ebx, ebx
je 0x4754f4
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], 0
add esp, 0x4c
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [edx + eax*8]
lea ebx, [edi + 1]
mov dword [ecx + 0x18], ebx
mov dword [ecx + 0x1c], 0
add eax, 1
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x3c]
mov dword [esp + 8], eax
lea eax, [esp + 0x36]
mov dword [esp + 4], eax
mov eax, dword [edx + 4]
mov dword [esp], eax
call fcn.0041c720
mov ecx, eax
mov eax, edx
or eax, ecx
jne 0x4756ad
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0x10]
mov ebp, dword [edx + 0x14]
lea ebx, [eax + 1]
jmp 0x475406
add esp, 0x4c
xor ecx, ecx
xor edx, edx
pop ebx
mov eax, ecx
pop esi
pop edi
pop ebp
ret
movzx esi, word [esp + 0x36]
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
call ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], str.fat_dir_cache_insert_internal
mov dword [esp + 0x10], 0x313
mov dword [esp + 0xc], str.dir.c
mov dword [esp + 8], 0x549666
mov dword [esp + 4], str.__s___s:_d___s__Unexpected_NULL_value_for_first_secondary_element_in_chain_for_key_0x_X.
jmp 0x475345
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
call ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], str.fat_dir_cache_insert_internal
mov dword [esp + 0x10], 0x32f
mov dword [esp + 0xc], str.dir.c
mov dword [esp + 8], 0x549666
mov dword [esp + 4], str.__s___s:_d___s__Unexpected_dirent_index_collision_for_index__lu_when_inserting_into_dir_cache.
jmp 0x475345
mov eax, dword [edx + 0x10]
mov ebp, dword [edx + 0x14]
cmp eax, ebp
je 0x4756fc
lea ebx, [edx + eax*8]
lea esi, [edi + 1]
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], 0
jmp 0x4753ff
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
call fcn.0041d490
mov ebx, dword [fcn.004a1b90]
mov edi, eax
mov eax, dword [esp + 0x38]
mov esi, dword [eax + 0x14]
mov dword [esp], 2
call ebx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x14], edi
add esi, esi
mov dword [esp + 8], 0x5496cd
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 4], str.__s__Error_while_expanding_secondary_table_to__Iu_elements:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x5496ca
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
jmp 0x4754d0
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
call fcn.0041d490
movzx esi, word [esp + 0x36]
mov dword [esp], 2
mov edi, eax
mov ebx, dword [fcn.004a1b90]
call ebx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ecx
mov dword [esp + 8], 0x5496cd
mov dword [esp + 4], str.__s__Error_while_inserting_entry_with_key_0x_X_into_primary_table:__lu___s_
jmp 0x47565e
mov ecx, eax
jmp 0x475366