Function at 0x10167b10
Capabilities:
Print debug messages
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x2b4
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2c8]
push edi
mov eax, dword [esi + 0x68]
push eax
call fcn.101d175d
mov ecx, dword [esi + 0x68]
mov ebx, eax
push ecx
call fcn.101d175d
mov edx, dword [esp + 0x2d0]
mov ebp, eax
mov eax, 1
xor edi, edi
push edx
mov dword [esp + 0x78], ebp
mov dword [esp + 0x1c], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa8], edi
mov dword [esp + 0x40], eax
call sym.ITEuDllvMgr.dll_VDR_CheckSYSReady
add esp, 0xc
test eax, eax
jne 0x10167b73
mov dword [esp + 0x90], edi
mov al, byte [esi + 0x7c]
cmp al, 2
jne 0x10167b80
mov dword [esp + 0x34], edi
jmp 0x10167b8c
cmp al, 6
sbb al, al
and al, 0xf0
add al, 0x20
mov byte [esp + 0x2f], al
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x120]
rep stosd dword es:[edi], eax
mov ecx, 0x10
lea edi, [esi + 0xb0]
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x68]
mov edi, ebp
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x2d0]
test edi, edi
je 0x10167bd0
mov ecx, 0x20000
xor eax, eax
rep stosd dword es:[edi], eax
mov al, byte [esi + 0xb]
mov cl, byte [esi + 9]
mov byte [esp + 0x28], al
mov ax, word [esi + 0x22]
mov dword [esp + 0x64], eax
and eax, 0xffff
cdq
mov byte [esp + 0x78], cl
mov ecx, dword [esi + 0x70]
push edx
push eax
push 0
push ecx
mov dword [esp + 0x84], ecx
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], edx
call fcn.10034a70
mov edi, eax
mov eax, dword [esp + 0x78]
and eax, 0xff
mov ebp, edx
cdq
push ebp
push edi
push edx
push eax
call fcn.10034a70
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x28]
mov ecx, edx
and eax, 0xff
mov dword [esp + 0x4c], ecx
push ecx
mov ecx, dword [esp + 0x4c]
cdq
push ecx
push edx
push eax
call fcn.10034a70
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x88], edi
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x2d4]
mov dword [esp + 0x5c], ecx
mov cl, byte [esi + 0xe]
mov dword [esp + 0x8c], ebp
mov byte [esp + 0xa4], cl
mov ecx, 1
xor ebp, ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
or ecx, 0xffffffff
cmp edi, ebp
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x50], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x94], ecx
mov dword [esp + 0x98], ecx
je 0x10167cb4
push edx
push eax
push ebp
push ebp
call fcn.1003fef0
mov dword [edi], eax
mov eax, dword [esp + 0x2d0]
test eax, eax
je 0x10167cc7
mov dword [esp + 0x20], 0
mov al, byte [esp + 0x28]
mov byte [esp + 0x30], 0
test al, al
jbe 0x10168836
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10167cec
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x1016879b
mov al, byte [esp + 0x78]
mov byte [esp + 0x38], 0
test al, al
jbe 0x10168653
mov eax, dword [esp + 0x30]
and eax, 0xff
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x54]
and eax, 0xff
xor edi, edi
mov dword [esp + 0x7c], eax
mov dword [esp + 0xa8], edi
lea ebp, [edx + eax*4]
mov eax, dword [esp + 0x2d0]
shl ebp, 0xe
add eax, ebp
mov dword [esp + 0x84], edi
mov dword [esp + 0x80], eax
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xa0], edi
cmp eax, edi
je 0x10167d5e
cmp dword [esp + 0x18], edi
jne 0x10168653
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x74]
cmp eax, edi
mov esi, 1
mov dword [esp + 0x60], ecx
je 0x10167f0d
mov cl, byte [0x10248ea9]
mov dword [esp + 0x1c], edi
mov dl, cl
or dl, 0xd
movzx si, dl
mov edx, dword [esp + 0x2cc]
mov al, byte [edx + 0x7c]
cmp al, 3
jne 0x10167da4
movzx si, cl
or esi, 0x60d
jmp 0x10167db2
cmp al, 6
jb 0x10167db2
movzx si, cl
or esi, 0x30f
cmp dword [esp + 0x90], edi
jne 0x10167dd4
mov eax, dword [esp + 0x2c8]
push edx
push eax
call sym.ITEuDllvMgr.dll_Init_SegTable
add esp, 8
test eax, eax
je 0x101686c7
mov ecx, 6
xor eax, eax
lea edi, [esp + 0xc4]
mov edx, dword [esp + 0x30]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x38]
push 0
stosw word es:[edi], ax
mov eax, dword [esp + 0x2d0]
push 0
push ecx
push edx
push eax
call sym.ITEuDllvMgr.dll_CCBAddress2RawAddress
mov ecx, dword [esp + 0x2e0]
lea edx, [esp + 0xd8]
push ecx
push eax
mov eax, dword [esp + 0x2e4]
push edx
push eax
call fcn.10167730
add esp, 0x24
test eax, eax
jne 0x10167eb1
mov esi, dword [esp + 0x2d4]
test esi, esi
je 0x10167e90
mov ecx, dword [esp + 0x7c]
lea eax, [ecx + 1]
mov ecx, dword [esp + 0x8c]
push ecx
mov ecx, dword [esp + 0x8c]
cdq
push ecx
push edx
push eax
call fcn.10034a70
mov ecx, dword [esp + 0x5c]
mov edi, eax
mov eax, dword [esp + 0x54]
mov ebp, edx
push ecx
mov ecx, dword [esp + 0x5c]
cdq
push ecx
push edx
push eax
call fcn.10034a70
add edi, eax
push 0
adc ebp, edx
push 0x64
push ebp
push edi
call fcn.10034a70
mov ecx, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x40]
push ecx
push edx
push eax
call fcn.1003fef0
mov dword [esi], eax
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x1016863d
mov edi, dword [esp + 0x68]
mov ecx, 0x1000
mov eax, 0x1010101
rep stosd dword es:[edi], eax
jmp 0x1016863d
mov eax, dword [esp + 0xc8]
mov edx, dword [esp + 0x2c8]
mov dword [esp + 0x44], eax
push edx
inc eax
push ebx
push esi
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0xdc]
push 1
push 0x40
push 1
push eax
call sym.ITEuDllvMgr.dll_VDR_BadTFindRead
add esp, 0x1c
cmp eax, 1
mov dword [esp + 0x10], eax
jne 0x101686d4
mov ecx, 3
mov edi, str.BTABww
mov esi, ebx
xor edx, edx
repe cmpsw word [esi], word es:[edi]
jne 0x101686e1
mov esi, dword [esp + 0x44]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x14], esi
cmp esi, eax
jae 0x10168564
mov ecx, dword [esp + 0x8c]
mov eax, dword [esp + 0x7c]
push ecx
mov ecx, dword [esp + 0x8c]
cdq
push ecx
push edx
push eax
call fcn.10034a70
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0xc0], edx
push ecx
mov ecx, dword [esp + 0x5c]
cdq
push ecx
push edx
push eax
call fcn.10034a70
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0x2d0]
add ebp, esi
mov dword [esp + 0xb8], edx
add ebp, eax
mov dword [esp + 0x44], ebp
mov edx, dword [esp + 0xb0]
mov eax, dword [esp + 0xac]
mov edi, dword [esp + 0x14]
push edx
push eax
push 0
push edi
call fcn.10034a70
mov ecx, dword [esp + 0xbc]
mov esi, dword [esp + 0xb4]
mov ebp, eax
mov eax, dword [esp + 0xc0]
add ebp, ecx
mov ecx, dword [esp + 0xb8]
adc edx, eax
add ebp, esi
mov esi, dword [esp + 0x2d4]
adc edx, ecx
test esi, esi
mov dword [esp + 0x4c], edx
je 0x10167fe9
push 0
push 0x64
push edx
push ebp
call fcn.10034a70
mov ecx, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x40]
push ecx
push edx
push eax
call fcn.1003fef0
mov dword [esi], eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10167ffd
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x10168564
mov edx, dword [esp + 0x2cc]
push edi
push edx
call sym.ITEuDllvMgr.dll_FLH_BlockIsGap
add esp, 8
test eax, eax
jne 0x1016853a
mov eax, dword [esp + 0x2cc]
mov cl, byte [eax + 0xe]
mov byte [esp + 0x24], cl
mov ecx, dword [esp + 0x9c]
test ecx, ecx
jne 0x1016816f
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x1016816f
cmp byte [eax + 0x7c], 6
jb 0x101680c4
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x244]
lea esi, [ebx + 0x2a]
rep stosd dword es:[edi], eax
mov ecx, 0x20
lea edi, [esp + 0x244]
rep movsd dword es:[edi], dword [esi]
lea esi, [esp + 0x244]
mov edi, 0x20
push esi
call sym.ITEuDllvMgr.dll_SwapWORD
mov word [esi], ax
add esp, 4
add esi, 2
dec edi
jne 0x10168072
mov al, byte [esp + 0x284]
mov cl, byte [esp + 0x24]
cmp cl, al
je 0x1016809b
mov byte [esp + 0x285], 1
mov byte [esp + 0x24], al
mov eax, dword [esp + 0x2c8]
lea edx, [esp + 0x244]
push edx
push eax
call sym.ITEuDllvMgr.dll_VDR_SetSegModePara_EXT
add esp, 8
test eax, eax
je 0x101686c7
jmp 0x10168146
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0xe0]
lea esi, [ebx + 0x2a]
rep stosd dword es:[edi], eax
mov ecx, 0x10
lea edi, [esp + 0xe0]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x115]
push ecx
call sym.ITEuDllvMgr.dll_SwapWORD
add esp, 4
mov word [esp + 0x115], ax
lea esi, [esp + 0xe4]
mov edi, 0x10
push esi
call sym.ITEuDllvMgr.dll_SwapWORD
mov word [esi], ax
add esp, 4
add esi, 2
dec edi
jne 0x10168109
mov ecx, dword [esp + 0x2c8]
mov dl, byte [esp + 0x114]
lea eax, [esp + 0xe0]
mov byte [esp + 0x24], dl
push eax
push ecx
call sym.ITEuDllvMgr.dll_VDR_SetSegModePara
add esp, 8
test eax, eax
je 0x101686c7
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x2cc]
mov dl, byte [esp + 0x24]
and ecx, 0xff
shl ecx, 9
mov dword [esp + 0x9c], 1
mov byte [eax + 0xe], dl
mov dword [eax + 0x68], ecx
cmp word [esp + 0x64], 0
mov dword [esp + 0x70], 0
jbe 0x1016853a
mov esi, dword [esp + 0x2d4]
jmp 0x10168197
mov esi, dword [esp + 0x2d4]
mov ebp, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
add ebp, 1
adc ecx, 0
mov dword [esp + 0x48], ebp
test esi, esi
mov dword [esp + 0x4c], ecx
je 0x101681cd
push 0
mov edx, ecx
push 0x64
push edx
push ebp
call fcn.10034a70
mov ecx, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x40]
push ecx
push edx
push eax
call fcn.1003fef0
mov dword [esi], eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x101681e1
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x1016853a
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
mov ebp, eax
and ebp, 0xffff
cmp byte [edx + ebp], 0
jne 0x10168526
mov esi, dword [esp + 0x2cc]
mov cl, byte [esi + 0x10b]
test cl, cl
jne 0x101686ee
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x18]
push eax
push ecx
push edx
push esi
call sym.ITEuDllvMgr.dll_CCBAddress2RawAddress
mov ecx, dword [esp + 0x38]
push esi
movzx dx, cl
push ecx
push 1
push ebx
push edx
push eax
mov eax, dword [esp + 0x2f4]
push eax
call sym.ITEuDllvMgr.dll_FLH_PhyiscalRead
add esp, 0x30
cmp eax, 1
jne 0x10168526
mov ecx, 2
mov edi, str.SegTable
mov esi, ebx
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x10168326
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x140]
push ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x144]
push eax
push str._DG_GetBlockPageMapFromFlash_:_Find_SegTable_in_block0x_X_Page0x_X._n
push ecx
call fcn.1003399c
add esp, 0x10
lea edx, [esp + 0x140]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov bp, word [ebx + 8]
mov ecx, 0x41
mov esi, ebp
xor eax, eax
lea edi, [esp + 0x140]
and esi, 0xffff
rep stosd dword es:[edi], eax
push esi
lea eax, [esp + 0x144]
push str._DG_GetBlockPageMapFromFlash_:_Segment_map_record_segment_number_d._n
push eax
call fcn.1003399c
add esp, 0xc
lea ecx, [esp + 0x140]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x1016830e
movzx dx, byte [esp + 0x2f]
cmp bp, dx
ja 0x101686fb
mov ecx, esi
lea esi, [ebx + 0x10]
mov eax, ecx
lea edi, [esp + 0x120]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x50], 1
mov dword [esp + 0x98], ecx
jmp 0x10168526
mov ecx, 9
mov edi, str.PageTable
mov esi, ebx
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x101683f7
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x140]
push ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x144]
push eax
push str._DG_GetBlockPageMapFromFlash_:_Find_PageTable_in_block0x_X_Page0x_X._n
push ecx
call fcn.1003399c
add esp, 0x10
lea edx, [esp + 0x140]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov bp, word [ebx + 9]
mov ecx, 0x41
mov esi, ebp
xor eax, eax
lea edi, [esp + 0x140]
and esi, 0xffff
rep stosd dword es:[edi], eax
push esi
lea eax, [esp + 0x144]
push str._DG_GetBlockPageMapFromFlash_:_Page_map_record_page_number_d._n
push eax
call fcn.1003399c
add esp, 0xc
lea ecx, [esp + 0x140]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x101683df
cmp bp, word [esp + 0x64]
jne 0x10168768
mov edi, dword [esp + 0x6c]
mov ecx, esi
mov edx, ecx
lea esi, [ebx + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], 1
mov dword [esp + 0x94], eax
jmp 0x10168526
mov ecx, 2
mov edi, str.BadBlock
mov esi, ebx
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x10168526
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x140]
push ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x144]
push eax
push str._DG_GetBlockPageMapFromFlash_:_Find_BadBlock_Table_in_block0x_X_Page0x_X._n
push ecx
call fcn.1003399c
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x10
lea edx, [esp + 0x140]
push edx
call esi
mov ebp, dword [ebx + 8]
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x140]
rep stosd dword es:[edi], eax
push ebp
lea eax, [esp + 0x144]
push str._DG_GetBlockPageMapFromFlash_:_CurrentBlkCnt0x_X._n
push eax
call fcn.1003399c
add esp, 0xc
lea ecx, [esp + 0x140]
push ecx
call esi
mov edx, dword [esp + 0xa0]
mov ecx, dword [esp + 0x2cc]
lea eax, [edx + ebp]
xor edx, edx
mov dx, word [ecx + 0x70]
cmp eax, edx
ja 0x10168772
mov cx, word [ecx + 0x68]
sub cx, 0x10
and ecx, 0xffff
cmp ebp, ecx
ja 0x10168772
mov edi, dword [esp + 0x68]
mov ecx, ebp
mov edx, ecx
lea esi, [ebx + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x84], 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x44]
mov byte [ecx], 6
mov ecx, dword [esp + 0x94]
cmp ecx, 0xffffffff
je 0x101684f0
mov edx, dword [esp + 0x80]
mov byte [edx + ecx], 6
mov ecx, dword [esp + 0x98]
cmp ecx, 0xffffffff
je 0x10168507
mov edx, dword [esp + 0x80]
mov byte [edx + ecx], 6
mov ecx, dword [esp + 0x2cc]
mov esi, dword [esp + 0x68]
add esi, ebp
mov dword [esp + 0xa0], eax
mov edx, dword [ecx + 0x70]
mov dword [esp + 0x68], esi
cmp edx, eax
jbe 0x10168559
mov eax, dword [esp + 0x70]
inc eax
cmp ax, word [esp + 0x64]
mov dword [esp + 0x70], eax
jb 0x1016818c
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x60]
inc eax
inc edx
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x44], edx
jae 0x10168564
jmp 0x10167f7a
mov dword [esp + 0xa8], 1
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x10168598
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x14]
cmp eax, edx
jne 0x10168598
mov eax, dword [esp + 0x84]
test eax, eax
jne 0x10168598
mov edi, dword [esp + 0x80]
mov ecx, 0x1000
mov eax, 0x1010101
rep stosd dword es:[edi], eax
jmp 0x101685d2
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x101685ac
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x1016877c
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10168789
mov eax, dword [esp + 0x84]
test eax, eax
je 0x101685d2
mov eax, dword [esp + 0xa8]
test eax, eax
je 0x10168772
mov eax, dword [esp + 0x2d4]
test eax, eax
je 0x1016863d
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x8c]
inc eax
push ecx
mov ecx, dword [esp + 0x8c]
cdq
push ecx
push edx
push eax
call fcn.10034a70
mov ecx, dword [esp + 0x5c]
mov esi, eax
mov eax, dword [esp + 0x54]
mov edi, edx
push ecx
mov ecx, dword [esp + 0x5c]
cdq
push ecx
push edx
push eax
call fcn.10034a70
add esi, eax
push 0
adc edi, edx
push 0x64
push edi
push esi
call fcn.10034a70
mov ecx, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x40]
push ecx
push edx
push eax
call fcn.1003fef0
mov edx, dword [esp + 0x2d4]
mov dword [edx], eax
mov al, byte [esp + 0x38]
mov cl, byte [esp + 0x78]
inc al
cmp al, cl
mov byte [esp + 0x38], al
jb 0x10167d0a
mov eax, dword [esp + 0x34]
test eax, eax
je 0x10168667
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10168793
mov esi, dword [esp + 0x2d4]
test esi, esi
je 0x101686ac
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x5c]
and eax, 0xff
push ecx
mov ecx, dword [esp + 0x5c]
inc eax
cdq
push ecx
push edx
push eax
call fcn.10034a70
push 0
push 0x64
push edx
push eax
call fcn.10034a70
mov ecx, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x40]
push ecx
push edx
push eax
call fcn.1003fef0
mov dword [esi], eax
mov al, byte [esp + 0x30]
mov cl, byte [esp + 0x28]
inc al
cmp al, cl
mov byte [esp + 0x30], al
jb 0x10167cd8
jmp 0x1016879b
mov dword [esp + 0x10], 0x37
jmp 0x1016879b
mov dword [esp + 0x10], 0x3a
jmp 0x1016879b
mov dword [esp + 0x10], 0x3b
jmp 0x1016879b
mov dword [esp + 0x10], 0x36
jmp 0x1016879b
mov dword [esp + 0x10], 0x38
mov edi, dword [esp + 0x2cc]
mov ecx, dword [esp + 0x18]
xor eax, eax
cmp ecx, eax
je 0x10168821
mov ebp, dword [esp + 0x64]
mov dword [esp + 0x1c], eax
cmp bp, ax
jbe 0x10168803
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x28]
cmp byte [edx], 0
je 0x101687ec
mov ecx, eax
shr ecx, 3
mov byte [esp + 0x74], cl
mov cl, al
mov edx, dword [esp + 0x74]
and ecx, 7
and edx, 0xff
lea esi, [edx + edi + 0xb0]
mov dl, 1
shl dl, cl
or byte [esi], dl
jmp 0x101687f0
mov dword [esp + 0x10], 0x31
jmp 0x1016879b
mov dword [esp + 0x10], 0x33
jmp 0x1016879b
mov dword [esp + 0x10], 0x39
jmp 0x10168703
mov dword [esp + 0x10], 0x32
jmp 0x1016879b
mov dword [esp + 0x10], 0x3d
mov eax, dword [esp + 0x50]
test eax, eax
je 0x10168703
mov edi, dword [esp + 0x2cc]
xor ecx, ecx
mov eax, 0x20
mov dl, byte [esp + ecx + 0x120]
test dl, dl
je 0x101687d5
mov esi, dword [edi + 0xfa]
mov edx, 1
shl edx, cl
or esi, edx
mov dword [edi + 0xfa], esi
inc ecx
dec eax
jne 0x101687b5
mov ax, word [edi + 0xfa]
mov word [edi + 0xf7], ax
jmp 0x1016870a
inc dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
inc eax
inc edx
cmp ax, bp
mov dword [esp + 0x28], edx
jb 0x10168731
mov eax, dword [esp + 0x1c]
mov byte [edi + 0xf0], 2
cmp ax, bp
jae 0x1016881a
mov byte [edi + 0xf0], 1
mov word [edi + 0xf4], ax
cmp dword [esp + 0x10], 1
jne 0x10168842
mov edi, dword [esp + 0x2d4]
mov esi, dword [esp + 0x2cc]
test edi, edi
je 0x10168849
mov dword [edi], 0x64
jmp 0x10168849
mov esi, dword [esp + 0x2cc]
mov ecx, dword [esp + 0xa4]
mov al, byte [esp + 0xa4]
and ecx, 0xff
mov byte [esi + 0xe], al
shl ecx, 9
mov dword [esi + 0x68], ecx
mov esi, dword [esp + 0x10]
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x140]
push esi
lea edx, [esp + 0x144]
push str._DG_GetBlockPageMapFromFlash_:_Final_Status_d._n
rep stosd dword es:[edi], eax
push edx
call fcn.1003399c
add esp, 0xc
lea eax, [esp + 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ebx
call fcn.101d1786
mov ecx, dword [esp + 0x70]
push ecx
call fcn.101d1786
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2b4
ret